how can I modify an imported variable ?
Gabriel Genellina
gagsl-py at yahoo.com.ar
Wed Dec 27 16:51:36 EST 2006
At Wednesday 27/12/2006 13:45, yomgui wrote:
>your sample code works, but mine doesn't.
>it must be a multi-thread issue.
>I am certain that I am modifying MyPackage.aVariable
>before using it.
>
>Both threads are importing MyPackage,
>but the modification of MyPackage.aVariable
>is not seen by the other thread. is this possible ?
Put some print statements and see what happens. I'm sure things are a
lot simpler than you think.
You said a module, but now you use MyPackage - how do you assign to
MyPackage.aVariable? inside its __init__.py?
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list