#24 Allow int options in different bases

open
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


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks