Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#24 Allow int options in different bases

open
Greg Ward
5
2006-11-04
2006-11-04
Bernhard
No

When I declare option "--foo" as type='int' I would
like to be able to enter the value in decimal or hex
using the "0x" prefix:
--foo 1000
--foo 0x3e8

should be the same.

This could easily be achieved by calling the int()
method with a second arg of "0" (base).

An optional keyword argument "base" could be used to
define the base of the integer value when adding the
option.

Discussion