On Fri, Jul 24, 2009 at 7:28 PM, superpollo<u...@example.net> wrote:
> 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:

What do you mean to pack? Maybe Pickle is what you want.

import cPickle
variable = 124348654333577698
cPickle.dump(variable,open('filename', 'w'))

To load it:

import cPickle
vaariable = cPickle.load(open('filename'))

It is not "into a string", but instead of a filename, use a string with stringio
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to