Message305054
In [this comment](https://bugs.python.org/issue16737#msg282872) I describe an issue whereby launching an application via runpy.run_module (aka python -m) produces different and unexpected behavior than running the same app via an entry script.
In [this followup comment](https://bugs.python.org/issue16737#msg304662), I provide more detail on why a user might expect for run_module to mimic the behavior of launching a script.
[Nick suggests](https://bugs.python.org/issue16737#msg304707):
> Update sys.path[0] based on __main__.__spec__.origin after [resolving] __main__.__spec__. That way it will only stay as the current directory if the module being executed is in a subdirectory of the current directory, and will otherwise be updated appropriately for wherever we actually found the main module. |
|
Date |
User |
Action |
Args |
2017-10-26 14:01:14 | jaraco | set | recipients:
+ jaraco |
2017-10-26 14:01:14 | jaraco | set | messageid: <1509026474.72.0.213398074469.issue31874@psf.upfronthosting.co.za> |
2017-10-26 14:01:14 | jaraco | link | issue31874 messages |
2017-10-26 14:01:14 | jaraco | create | |
|