Benjamin-Loison / pyzo

Python to the people
https://pyzo.org
Other
0 stars 0 forks source link

Ability to run (part of) script in its folder? #3

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

Pyzo current latest release 4.15.0 Shells > Python > Edit shell configurations... does not seem to solve this issue:

image

Investigate Run, especially Change directory when executing file.

import os

print(os.getcwd())

Run > Run file as script has the wanted change directory behavior, but not Run > Execute file, enabling Change directory when executing file makes Execute file has the wanted change directory behavior.

I agree that running part of a script in its folder is ambiguous and running the whole script in its folder is already easing some use cases on my end.