#python - Sun 18 Feb 2007 between 08:18 and 08:35

NY Lost Funds



MrRaggahi, how can i pass arguments to the constructor of a TestCase (unittest) ?
tkpsomething is modifying the exit status. I can clearly see the code doing exit(2). Yet I get back a 0 in $? :(
ayaztkp: there's the queue module with threading to pass messages behind, but i don't think that would apply to your case.
irvinwhich is easier to learn for a newbie: wxpython or pygtk+glade?
ayaztkp: you could get myscript.py to set up some env variable right before the call to sys.exit.
and then test that variable from the other code to rule out it being a shell/env problem.
tkpayaz: think I see why...
http://rafb.net/p/5b8jrp97.html
no idea why they would do that tho?
ayazum, so, there's a possiblity, like you said, of something masking the SystemExit and exiting properly.
which might explain the 0 in the exit status
tkpI think that does explan it...
I just don't understand why they would do that
ayazthat's the only thing that comes to mind.
defeats the purpose, i know.
tkp: i think whoever wrote that script didn't really know what they were doing with catching SystemExit there.
heh
tkp/ Capture the text of any other exception that's raised by the interpreter
/ into a StringIO buffer for later extraction.
look t that past again... When a SystemExit is caught... with it exit with 0, or will the next except: block be run?
ayazexcept SystemExit:
sys.exit(0)
if a SystemExit is caught, sys.exit(0) over there will be run
the script with exit gracefully.
tkphmm... that really odd
ayazi think the author meant to catch some other exception.
tkpwhy would you want that? doesn't make any sence to me
ayazyeah. it doesn't, at all.
tkpI've seen this done elsewhere
http://mail.python.org/pipermail/python-list/2004-December.txt
search for SystemExit
and here:
http://lists.helixcommunity.org/pipermail/ribosome-cvs/2004-December/000376.html
ayazthere is one that masks a SystemExit with a 'pass'
tkp(from another place in the same app I'm using)
oh yeah! this one too
ayazthis one avoid SystemExit
tkpperhaps thats what they meant to do
ayazthe pass will mask the SystemExit (rendering the call to sys.exit(0) ineffective) and continue on with further processing.
veracon_Anyone familiar with reST know if I can indent the names of a definition list slightly, then indenting the definitions more (and still retain a valid markup)?

Page: 5 12 19 26 33 40 

IrcArchive

NY Lost Funds