Re: Cathing several potential errors?

2008-09-06 Thread Gary Josack
cnb wrote: if i do try: something except TypeError, IndexError: pass only the first error will get caught. I dont want to use Exception and catch all errors, but just 2. how can i do that? -- http://mail.python.org/mailman/listinfo/python-list what you're doing is assigning the value

Re: python lists and newline character

2008-07-28 Thread Gary Josack
Gary Herron wrote: Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomain.com).readlines() x returns a list, of usernames, and I am trying to append the

Re: How to figure out if the platform is 32bit or 64bit?

2008-07-28 Thread Gary Josack
Trent Mick wrote: Manuel Vazquez Acosta wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just test for maxint value: from sys import maxint if maxint >> 33: print "more than 32 bits" # probably 64 else: print "32 bits" I believe that was already suggested in this thread. That tes

Re: Simple Path issues

2008-07-26 Thread Gary Josack
Brett Ritter wrote: On Jul 26, 2:57 pm, Gary Josack <[EMAIL PROTECTED]> wrote: sys.path is a list that will tell you where python is looking. You can append to this in your scripts to have python look in a specific directory for your own modules. I can, but that is almost cer

Re: Simple Path issues

2008-07-26 Thread Gary Josack
Brett Ritter wrote: New to Python, and I have some questions on how to best set up a basic development environment, particular relating to path issues. Note: I am not root on my development box (which is some flavor of BSD) Where should I develop my own modules so as to refer to them in the sta

Re: How to find processes from Python

2008-07-25 Thread Gary Josack
Cameron Simpson wrote: On 25Jul2008 11:34, Johny <[EMAIL PROTECTED]> wrote: | Is there a way how to find out running processes?E.g. how many | Appache's processes are running? See the popen function and use the "ps" system command. Use of the popen functions is generally discouraged since be