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

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -