cmdline.py not working in ActiveState Python 2.1

David Lees DavidLSpamNoNo at raqia.com
Fri Jun 22 20:41:44 CEST 2001


I have the following simple testcode using cmdline.py (by Daniel
Gindikin), which is parsing command lines:

import os,sys,cmdline

b=cmdline.receivedOption('-x')
print b
if b:                    
    print cmdline.getIntegerValueOf('-x')


when called with command line 'testcmd.py -x 3'
from a Linux version of Python 2.1 it works correctly. However, using
the same build (ActiveState) under windows NT, the command line option
is not recognized and 'b' has value zero.

Any idea what is going on here?  I think this command line parser used
to work on older windows Python distributions.

Thanks in advance,

david lees



More information about the Python-list mailing list