[issue4548] OptionParser : Weird comportement in args processing

2008-12-05 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: This is not a bug. By default, options in optparse take an argument -- therefore, the -y is taken as the argument to the -p option. Use e.g. add_option(..., action='store_true') to specify an option that doesn't take an argument. -- n

[issue4548] OptionParser : Weird comportement in args processing

2008-12-05 Thread Olivier Hervieu
New submission from Olivier Hervieu <[EMAIL PROTECTED]>: Hi guys.. i found something strange on the behavior of OptionParser If I have this sample code : import sys from optparse import OptionParser if __name__ == '__main__': parser = OptionParser() parser.add_option("-p", "--p", help