Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Peter Otten
Dieter Maurer wrote: > Stephan Lukits wrote at 2020-3-31 17:44 +0300: >>background: >> >>- a daemon creates package p1 (e.g. directory with __init__.py-file) and >>in p1 a module m1 is created. >> >>- Then the daemon wants to import from m1, which functions (so far all >>the time). >> >>- Then a m

[Solved] Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
On 3/31/20 8:00 PM, Dieter Maurer wrote: Stephan Lukits wrote at 2020-3-31 17:44 +0300: background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from m1, which functions (so far all the time). - Then

Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
On 3/31/20 9:01 PM, Pieter van Oostrum wrote: "Dieter Maurer" writes: Stephan Lukits wrote at 2020-3-31 17:44 +0300: background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from m1, which functions

Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Pieter van Oostrum
Pieter van Oostrum writes: > > The first import creates a file __pycache__ in the directory p1. That should be 'a directory __pycache__' > To remove it use rmtree(path.join(P1,'__pycache__')) > Then the second import will succeed. > -- > Pieter van Oostrum > www: http://pieter.vanoostrum.org/ >

Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Pieter van Oostrum
"Dieter Maurer" writes: > Stephan Lukits wrote at 2020-3-31 17:44 +0300: >>background: >> >>- a daemon creates package p1 (e.g. directory with __init__.py-file) and >>in p1 a module m1 is created. >> >>- Then the daemon wants to import from m1, which functions (so far all >>the time). >> >>- Then

Re: dynamic import of dynamically created modules failes

2020-03-31 Thread Dieter Maurer
Stephan Lukits wrote at 2020-3-31 17:44 +0300: >background: > >- a daemon creates package p1 (e.g. directory with __init__.py-file) and >in p1 a module m1 is created. > >- Then the daemon wants to import from m1, which functions (so far all >the time). > >- Then a module m2 is created in p1 and the

dynamic import of dynamically created modules failes

2020-03-31 Thread Stephan Lukits
Hello, background: - a daemon creates package p1 (e.g. directory with __init__.py-file) and in p1 a module m1 is created. - Then the daemon wants to import from m1, which functions (so far all the time). - Then a module m2 is created in p1 and the daemon wants to import from m2 which fail