I need to run a python script from my linux ubuntu desktop and I have forgotten the correct path -
** If the python file is on my DESKTOP do I input this in terminal?
python /home/(user)/Desktop file.py
-- or ---
python ~/Desktop/file.py
Thanks
Printable View
I need to run a python script from my linux ubuntu desktop and I have forgotten the correct path -
** If the python file is on my DESKTOP do I input this in terminal?
python /home/(user)/Desktop file.py
-- or ---
python ~/Desktop/file.py
Thanks
The notation '~/' is the BASH shortcut for /home/username/. So, I believe either should work if your file is on your Desktop. If you use the full path, don't forget the slash between "Desktop" and your file name:
Code:python /home/(user)/Desktop/file.py