0
votes

i have a problem with executing commands in prolog,

as http://www.swi-prolog.org/pldoc/man?predicate=shell/2

i am trying to run a python file from prolog using the shell

shell('cmd.exe /C python C:\\Users\\yousef_soliman\\a.py').

but it returns in prolog

false

i have installed python and i can run it from the cmd

python C:\\Users\\yousef_soliman\\a.py

and it works

1

1 Answers

0
votes

Please try:

shell('python C:\\Users\\yousef_soliman\\a.py').