[Numpy-discussion] documentation generator based on pyparsing
Nils Wagner
nwagner at iam.uni-stuttgart.de
Fri Nov 30 04:19:54 EST 2007
On Fri, 30 Nov 2007 09:48:09 +0100
Robert Cimrman <cimrman3 at ntc.zcu.cz> wrote:
> Nils Wagner wrote:
>> Thank you for your note. It works fine for me with
>> python2.5. However python2.3 results in
>>
>> ./gendocs.py -m 'scipy.linsolve.umfpack'
>> Traceback (most recent call last):
>> File "./gendocs.py", line 261, in ?
>> main()
>> File "./gendocs.py", line 207, in main
>> default = 1, help = help['page'] )
>> File "/usr/lib64/python2.3/optparse.py", line 820, in
>> add_option
>> option = self.option_class(*args, **kwargs)
>> File "/usr/lib64/python2.3/optparse.py", line 430, in
>> __init__
>> checker(self)
>> File "/usr/lib64/python2.3/optparse.py", line 499, in
>> _check_type
>> raise OptionError("invalid option type: %r" %
>> self.type, self)
>> optparse.OptionError: option -p/--page: invalid option
>> type: <type 'int'>
>>
>> How can I resolve this problem ?
>>
>
> In gendocs.py, line 205, try to replace 'type = int'
>with 'type = "int"':
>
> parser.add_option( "-p", "--page", metavar = 'page',
>type = "int",
> action = "store", dest = "page",
> default = 1, help = help['page']
>)
>
> thanks for reporting bugs,
> r.
Great ! Thank you very much ! It works for me.
Cheers,
Nils
More information about the NumPy-Discussion
mailing list