bug in os.system?

2005-10-18 Thread nicksjacobson
The following code fails (pythonbugtest.exe takes one parameter, a string): import os result = os.system('pythonbugtest.exe test') assert(result == 0) The error message is: 'pythonbugtest.exe test' is not recognized as an internal or external command, operable program or batch file. Traceback

Re: bug in os.system?

2005-10-18 Thread nicksjacobson
OK, I give up. Why does workaround #2 work? Also, I didn't realize this before, but when you call os.spawnv, the argument list you pass starts with the name of the executable you're calling! When you call a program from cmd.exe, that program name is the first parameter automatically. But with

deprecation of has_key?

2005-04-21 Thread nicksjacobson
I haven't heard of any plans to deprecate the dictionary has_key method, as the in keyword makes it obsolete. i.e. if key in dict: instead of if dict.has_key(): Is there some reason to keep has_key? --Nick -- http://mail.python.org/mailman/listinfo/python-list

number conversion

2005-04-06 Thread nicksjacobson
I'm writing a program to read in raw data from a WAV file, and write it to an IT file. I got this to work in C by reading the data into an array of unsigned chars called RawDataAry, then converted it to signed chars by doing the following: signed char *CharAry = malloc(sizeof(signed char) *