Re: How to get a raised exception from other thread



On non-Windows system there are a ton of ways to do it--this is almost a
whole field unto itself. :) (D-BUS, fifos, sockets, shmfs, etc.) In
Windows, I wouldn't have a clue.

I guess this is a hard question to answer without a bit more
information. :)

On Fri, 2005-10-14 at 14:45 -0700, dcrespo wrote:
> Hi all,
>
> How can I get a raised exception from other thread that is in an
> imported module?
>
> For example:
>
> ---------------
> programA.py
> ---------------
>
> import programB
>
> thread = programB.MakeThread()
> thread.start()
>
> ---------------
> programB.py
> ---------------
> import threading, time
>
> class SomeException(Exception):
> pass
>
> class MakeThread(threading.Thread):
> def __init__(self):
> threading.Thread.__init__(self)
>
> def run(self):
> i = 0
> while 1:
> print i
> i += 1
> time.sleep(1) #wait a second to continue
> if i>10:
> raise SomeException()
>
>
> Thanks
>
> Daniel
>

.



Relevant Pages

  • Getting through login without password
    ... clue, let me know. ... The system has Windows XP Home Edition. ... Prev by Date: ...
    (microsoft.public.access.security)
  • Re: auto play
    ... >I am using windows xp home edition. ... This might give you a clue. ... Prev by Date: ...
    (alt.os.windows-xp)
  • Re: Windows and Office download sites
    ... A clue as to what you mean by "Blocked" would help? ... >I am continually getting blocked from using the Windows and Office download ... Prev by Date: ...
    (microsoft.public.office.misc)
  • Odd Error Message popping up.
    ... Anyone has a clue how to resolve this issue because I haven't found anything ... That message pops up whenever I load up IE and open new windows and such. ... Prev by Date: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: OMG I already hate this mod and Im only 1 day in it.
    ... mods and this guy has no clue what he's teaching. ... presentation we saw today that there was a Windows SE operating system ... this guy from Africa named Salazar taught the hands on portion whilst ... "Freedom, true freedom, is nothing more than intellectual advantage over others." ...
    (alt.2600)