Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

With python, the first "import" of a library runs its initialization
code. Subsequent imports only retrieves the module object from the memory.

> for this library, it matter where you import the thing.

More precisely: it matters where you *first* import the thing. the
pyatspi import function probably runs some code that depends on the
running thread.
This is a common issue for event-driven libraries, often resolved by
splitting the initialization into two phases, the "import" phase and an
"init" function that performs thread-sensitive things.
You should forward your problem to the pyatspi team.

Since your first example works correctly, I close this issue as "works
for me".

----------
nosy: +amaury.forgeotdarc
resolution:  -> works for me
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5908>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to