Re: Passing information between modules

2022-11-18 Thread Axy via Python-list
On 18/11/2022 10:53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] This idea has a couple of flaws so can be regarded as bad. However

Re: Passing information between modules

2022-11-18 Thread Thomas Passin
On 11/18/2022 10:19 AM, Tobiah wrote: On 11/18/22 02:53, Stefan Ram wrote:    Can I use "sys.argv" to pass information between modules    as follows?    in module A: import sys sys.argv.append( "Hi there!" )    in module B: import sys message = sys.argv[ -1 ] Kind of seems like a code smel

Re: Passing information between modules

2022-11-18 Thread Tobiah
On 11/18/22 02:53, Stefan Ram wrote: Can I use "sys.argv" to pass information between modules as follows? in module A: import sys sys.argv.append( "Hi there!" ) in module B: import sys message = sys.argv[ -1 ] Kind of seems like a code smell. I think you would normally just inj

Re: Importlib behaves differently when importing pyd file

2022-11-18 Thread Jach Feng
Dieter Maurer 在 2022年11月17日 星期四凌晨1:12:20 [UTC+8] 的信中寫道: > Jach Feng wrote at 2022-11-15 22:52 -0800: > >My working directory d:\Works\Python\ has a package 'fitz' looks like this: > > > >fitz\ > >__init__.py > >fitz.py > >utils.py > >_fitz.pyd > > > >The