<s> from pyswip . prolog import Prolog <EOL> from pyswip . easy import registerForeign , getAtomChars <EOL> def hello ( t ) : <EOL> print "<STR_LIT>" , t <EOL> hello . arity = <NUM_LIT:1> <EOL> def main ( ) : <EOL> registerForeign ( hello ) <EOL> prolog = Prolog ( ) <EOL> prolog . assertz ( "<STR_LIT>" ) <EOL> prolog . assertz ( "<STR_LIT>" ) <EOL> list ( prolog . query ( "<STR_LIT>" ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
