Re: getting a process's PID

2006-12-27 Thread eldorado
On Wed, 27 Dec 2006, Sebastian 'lunar' Wiesner wrote: > eldorado <[EMAIL PROTECTED]> typed > > Strange!? On my system with Python 2.4 I don't get this error. It is > likely to be a problem of your really ancient python version. Do I > guess correctly from your

Re: getting a process's PID

2006-12-27 Thread eldorado
On Wed, 27 Dec 2006, Sebastian 'lunar' Wiesner wrote: > eldorado <[EMAIL PROTECTED]> typed > >> Hello, >> >> I am trying to get python to give me the PID of a process (in this >> case >> HUB). I have it working, except for the fact that the o

Re: getting a process's PID

2006-12-27 Thread eldorado
On Wed, 27 Dec 2006, Erik Johnson wrote: > > "eldorado" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>>>> g = os.popen("ps -ef | grep HUB | grep -v grep | awk '{ print $2 }'") >>>>> h = g

Re: getting a process's PID

2006-12-27 Thread eldorado
On Wed, 27 Dec 2006, Erik Johnson wrote: > "eldorado" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hello, >> >> I am trying to get python to give me the PID of a process (in this case >> HUB). I have it working, except for the

getting a process's PID

2006-12-27 Thread eldorado
Hello, I am trying to get python to give me the PID of a process (in this case HUB). I have it working, except for the fact that the output includes \012 (newline). Is there a way to ask python not to give me a newline? Python 1.4 (Oct 14 1997) [C] Copyright 1991-1995 Stichting Mathematisch C

Re: Newbie question - leading zeros

2006-10-13 Thread eldorado
On Fri, 13 Oct 2006, Rainy wrote: > > eldorado wrote: >> I have looked around and cannot seem to find a way to strip leading zeros >> off of values in a dictionary. Basically, I am looking to do a for loop >> and any value that has one or more leading zeros would be s

Newbie question - leading zeros

2006-10-13 Thread eldorado
I have looked around and cannot seem to find a way to strip leading zeros off of values in a dictionary. Basically, I am looking to do a for loop and any value that has one or more leading zeros would be stripped. Any pointers would be appreciated. Thanks -- Randomly generated signature ICMP:

value exists (newbie question)

2006-09-19 Thread eldorado
Hello, I am trying to parse some files so that if a postal code exists, but is longer than five digits it will return me only the first five digits: ... for insDict in insureDict: insDict['postalcode'] = insDict.get('postalcode')[:5] ... This works, except for when I get a blank postalcod