is there a pythonic and synthetic way (maybe some standard module) to "pack" an integer (maybe a *VERY* big one) into a string? like this:

 >>> number = 252509952
 >>> hex(number)
 '0xf0cff00'
 >>>

so i would like a string like '\xf0\xcf\xf0\x00'

i wrote some code to do it, so ugly i am ashamed to post :-(

i tried xdrlib, but does not quite do what i mean...

bye
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to