Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-24 Thread jak
Ralf M. ha scritto: Am 22.04.2023 um 03:27 schrieb Greg Ewing via Python-list: How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script, the embedding

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-23 Thread Mats Wichmann
On 4/22/23 16:04, Ralf M. wrote: Am 21.04.2023 um 18:07 schrieb Thomas Passin: On 4/20/2023 5:47 PM, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Greg Ewing via Python-list
On 23/04/23 10:04 am, Ralf M. wrote: I thought about that, but for that to work all local modules across all script locations must have unique names, otherwise import might get hold of a module from the wrong directory. You could put all the local modules belonging to a particular script into

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Thomas Passin
On 4/22/2023 5:45 PM, Ralf M. wrote: Am 22.04.2023 um 03:27 schrieb Greg Ewing via Python-list: How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script,

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 21.04.2023 um 18:07 schrieb Thomas Passin: On 4/20/2023 5:47 PM, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" finds my_local_module.py

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 22.04.2023 um 03:27 schrieb Greg Ewing via Python-list: How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script, the embedding application could do it

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 21.04.2023 um 17:31 schrieb Mats Wichmann: On 4/20/23 15:47, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" finds my_local_module.py in

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Greg Ewing via Python-list
How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script, the embedding application could do it before running the script. -- Greg --

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Thomas Passin
On 4/20/2023 5:47 PM, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" finds my_local_module.py in the directory of the script. However,

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Mats Wichmann
On 4/20/23 15:47, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" finds my_local_module.py in the directory of the script. However, when I