Re: [Tutor] decimal floating point?

2006-05-02 Thread Yi Qiang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 michel maho wrote, On 05/02/2006 07:33 AM: > To all > I have the following calculation: > > "Je Body Mass Index is",gewicht/lengte**2 > > The result is a (digital?)floating point figure with with 10 decimal > numbers. For = > example

[Tutor] question regarding subprocess.Popen

2006-05-09 Thread Yi Qiang
Hi list, I am launching another python program in my python daemon like this: pobj = subprocess.Popen(tlsmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT,

Re: [Tutor] crontab or python mistake

2006-05-25 Thread Yi Qiang
2] No such file or directory: ' emmssg.txt' > Right, but I don't think the CWD for cron is in /root. Try giving it an absolute path. - -- Yi Qiang ([EMAIL PROTECTED]) Web: http://www.yiqiang.net Tel: (206) 661-8469 PGP: 0xB515564B

Re: [Tutor] Not Really Questions

2006-06-04 Thread Yi Qiang
nd definitions usually start by consideriung > zero - or at least defining whether zero is in or out of scope. That is just not true. A number is positive if and only if it is strictly greater than 0 by definition. Zero is not considered positive in mathematics. In fact, the set of positive in

[Tutor] problem with unpickling an object

2006-06-04 Thread Yi Qiang
ke it skip over that particular key and just set the value to None? Thanks, - -- Yi Qiang ([EMAIL PROTECTED]) Web: http://www.yiqiang.net Tel: (206) 661-8469 PGP: 0xB515564B -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEg8k0tXlIMrUVVksRAt2tAJ4hq/3KmDo6BbS3p3AwhKf4Ga52DQC

Re: [Tutor] problem with unpickling an object

2006-06-05 Thread Yi Qiang
ss the dict to change the placeholder instances to None if you > like. Interesting, so if I used this method I won't be able to use cPickle anymore. The documentation just says that cPickle is "faster", but can anyone quantify how much speed I am losing if I move to the regular

Re: [Tutor] problem with unpickling an object

2006-06-05 Thread Yi Qiang
he find_global attribute for cPickle? I created an cPickle.Unpickler object, and the only attributes that I have access to are .load and .noload. What am I missing here? - -- Yi Qiang ([EMAIL PROTECTED]) Web: http://www.yiqiang.net Tel: (206) 661-8469 PGP: 0xB515564B -BEGIN PGP SIGNATURE-

Re: [Tutor] problem with unpickling an object

2006-06-05 Thread Yi Qiang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yi Qiang wrote, On 06/05/2006 01:22 PM: > Kent Johnson wrote, On 06/05/2006 07:25 AM: >>> No, the find_global() hook is for cPickle. See the next-to-last >>> paragraph on this page: >>> http://docs.python.org/lib/pi

[Tutor] hardware specs from python on OSX

2006-11-07 Thread Yi Qiang
Hi, I am trying to get some basic information about the computer's hardware specs in OSX in python. In linux I can get most of what I need from the /proc filesystem. Is there an equivalent in OSX? If not, where else can I get information about the system from? I need CPU model, # of cpus, cpu s

[Tutor] resetting the python interpreter through manipulating globals()

2007-02-08 Thread Yi Qiang
Hi, I have a program that talks to a python interpreter through pexpect (don't bother asking why ;). What I would like to do is occasionally "reset" the interpreter to the state it would be in if it had just been launched. I assumed I could simply clear out the globals() dictionary, minus