Entering edit mode
7.7 years ago
ahmedakhokhar
▴
150
I have a script.py in /Users/admin/Desktop and I want to run this script on a file that is in /Users/admin//Desktop/folder/file.txt, without changing the present path (i.e. /Users/admin/Desktop)
Question: what is the most efficient way to do that on command-line ? I am using the following commands and results are not as expected.
$ python script.py --script; /Users/admin/Desktop/file.txt
raise StopIteration('because of missing file (file.txt)')
StopIteration: because of missing file (file.txt)
so far I have tried the following commands:
Fail #1:
python script.py && /Users/admin/Desktop/folder/file.txt
StopIteration: because of missing file (file.txt)
Fail #2
python script.py; /Users/admin/Desktop/folder/file.txt
StopIteration: because of missing file (file.txt)
Fail #3
python script.py -C ~/Users/admin/Desktop/folder/file.txt
StopIteration: because of missing file (file.txt)