Running a python file from current location to another one?

1716 views python

I am new in Ubuntu :) By using Terminal now i am on particular location and i want to run a python file that found in another location ? what the correct command to run this file in the current location? Thanks in advance

answered question

1 Answer


Use the complete file path, just:

python /home/user/this/is/an/example/

If you are not sure where the file is, open a terminal window in its location and type pwd, this will give you the current directory

posted this

Have an answer?


Please login first before posting an answer.