linux - syntax error near unexpected token while executing a python file -
i trying execute python file not saved in python directory in different 1 in linux (fedora) terminal. tried was:
$ exec(vsh1.py)
which resulted error:
bash: syntax error near unexpected token 'vsh1.py'
could find solution please... in advance
locate python's source file
find / -name vsh1.py
and once located run
python /path_you_found/vsh1.py
if want script seen location interpreter have add pythonpath:
pythonpath=$pythonpath:/path_you_found/vsh1.py
if script in same directory can run
python ./vsh1.py
Comments
Post a Comment