convert hex to decimal
Peter Maas
peter.maas at somewhere.com
Thu Mar 9 15:34:09 EST 2006
challman at gmail.com schrieb:
> popS = string.join(pop.readlines())
Why not popS = pop.read()?
> The output from the second popen is:
>
> SNMPv2-SMI::enterprises.9.9.168.1.2.1.1.13.51858 = Hex-STRING: 00 00 00
> 26
>
>
> I need to get the Hex-STRING into the following format: 0.0038.. I know
> how to covert 26 to 38 but I haven't figured out how to pad it or place
Have look at ljust/rjust(width[, fillchar])
> the decimal point between the while number and the decimal.
What's a while number?
Peter Maas, Aachen
More information about the Python-list
mailing list