* TypeError - Need help passings args

Juho Schultz juho.schultz at helsinki.fi
Wed Nov 2 11:35:44 EST 2005


Ernesto wrote:
> Thanks, that ran without errors.  The only problem now is that it
> launches devcon.exe without actually passing the parameters to the
> program.  It's as if I just typed "devcon" at a Windows command prompt
> and pressed enter.  I can't figure out why it doesn't accept my
> parameter.
> 
I run python 2.3 on Linux os subprocess module and Windows executables 
are not too familiar to me. But according to docs subprocess.Popen() 
should accept both list and string arguments.

Your strings have backslashes so check docs.python.org/ref/strings.html

a = 'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&0000'
print a
disable "@USB\VID_0403&PID_6010&MI_00&15E4F68&1&0000

\7 is the ASCII bell so your args may be different from what you think.



More information about the Python-list mailing list