hst at empolis.co.uk
Thu Jan 23 11:16:37 CET 2003
Petri Järvinen wrote:
> Hi, I assume that this is a FAQ-question, but I didn't find a
> I have a string '0xff00ff' and I want to store it as a hex-number not
> Is that possible? I know that I can write to Python shell hexnumbers
> > a = 0xff00ff
> > a
> > hex(a)
> > '0xff00ff'
> What's the trick?
> (I think it should not be possible as hex-is only a representation of
> Second question.
> Has anyone ran in to the problem above when using Python interface to
> - Petri Järvinen
a = '0xff00ff'
print int(a, 16)
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service.
More information about the Python-list