Reputation: 2449
This may be a basic question but is there any difference in these two:
First:
cd /dir/
python run.py
Second:
python /dir/run.py
It seems previously executing them in these different ways seemed to cause different results, but it may be down to another factor.
Upvotes: 0
Views: 41
Reputation: 2467
The __file__
variable is set differently so it will have impact on calling resources inside your script (different relative paths).
Upvotes: 1