Re: how to append to a list twice?

2006-04-21 Thread callmebill
I don't get it (the Elliot solution)... How is it that the first value is repeated once times, and the remaining values are repeated twice times? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie wxPython questions.

2006-04-07 Thread callmebill
Instead of self.Close(), try parent.Close() The self.Close() is closing self, which is a panel. The panel's parent is the frame. This will let you keep the button on the frame, which eliminates the spacing problem. I'm not gonna test it, cuz the darn lines wrap and make it difficult to copy you

Re: Dynamically add Class to Modules

2005-12-08 Thread callmebill
Oh! I see what I missed. I didn't supply the namespace into which the new class was going to be added (correct that statement, please, if it is incorrect). So by using this slight modification, thinks seemed to work: exec testModule.TheTestCode %(testModule.TheTestName, testModule.TheTestName )

Re: Dynamically add Class to Modules

2005-12-08 Thread callmebill
Hi Michael... It didn't seem to take. Here is some of the actual code: [[ from the runner ] print "+++" print "::Dir before exec:",dir(testModule) import CodeGenBase

Dynamically add Class to Modules

2005-12-08 Thread callmebill
I'm trying to add a class to a module at runtime. I've seen examples of adding a method to a class, but I haven't been able to suit it to my needs. As part of a testsuite, I have a main process X that searches recursively for python test files. Those files typically have a global "isSupported" m

Making a timebomb

2005-08-05 Thread callmebill
I have a server that right now runs infinitely. I'd like to make it die after some amount of time. I was thinking of having a timebomb thread that starts when the server starts. The timebomb sits, and sleeps for the specified timeout period (e.g., 5 hours), then does something to make the main t

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
You could also set your "python" environment variable on the system... set it to be "/path/to/python2.4". Then use the "#!/usr/bin/env python" trick. Just make sure that env is working for you, first. -- http://mail.python.org/mailman/listinfo/python-list

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
oops... I missed the "too specific comment." Sorry =) -- http://mail.python.org/mailman/listinfo/python-list

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
On your system, do: which python2.4 That will give you the full path to the python2.4 binary (let's call it "path/to/py24"). Then add: #!/path/to/py24 ...to the top of your script. And make sure the file is chmod'd +x -- http://mail.python.org/mailman/listinfo/python-list

Overriding a built-in exception handler

2005-07-21 Thread callmebill
I'm having a tough time figuring this one out: class MyKBInterrupt( . ): print "Are you sure you want to do that?" if __name__ == "__main__": while 1: print "Still here..." So this thing keeps printing "Still here..." until the user hits ctl-c, at which time the except

Re: Native ODBC access for python on linux?

2005-07-15 Thread callmebill
I know... I'm expecting pain, and when that pain doesn't arrive I assume that I did something wrong. Actually, I was using the odbc/dbi stuff that ships with the win32 distribution for my windows work, and using MySQLdb for my linux work. Most of the code is the same. But I suppose the big benefi

Re: Native ODBC access for python on linux?

2005-07-15 Thread callmebill
All, This info was very helpful, and I'm up and running with MySQLdb on linux, and the native ODBC support on Windows. One last question I have: In vbs (specifically with .asp) I can make a connection to an ODBC provide _without_ the need to specify a system DSN in the Control Panel. It's easy

Re: Native ODBC access for python on linux?

2005-07-14 Thread callmebill
Can you tell me what I have to use in order to utilize the MySQL native API? There's some gap (chasm, really) in my knowledge that is keeping me from following that route. If you could provide a small example or a couple names, that would be extremely helpful. Thanks again for your time. Larry

Native ODBC access for python on linux?

2005-07-14 Thread callmebill
I'm getting my feet wet with making Python talk to MySQL via ODBC. I started on Windows, and it went smoothly enough due to the ODBC stuff that apparently is native to Python at least on windows (I've been following ch. 13 of Mark Hammond's py on win32 book). But now I'm trying to do equivalent s