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 appli
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 my_local
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
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, th
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
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 be
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
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
--
https://mail.python.org
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, whe
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
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 run the same script with embeddabl
11 matches
Mail list logo