Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: How to get an integer from a sequence of bytes Date: Tue, 28 May 2013 16:04:01 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 10 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1369757041 10001 64.122.56.22 (28 May 2013 16:04:01 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 28 May 2013 16:04:01 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:46305 On 2013-05-27, Mok-Kong Shen wrote: > From an int one can use to_bytes to get its individual bytes, > but how can one reconstruct the int from the sequence of bytes? One way is using the struct module. -- Grant Edwards grant.b.edwards Yow! Uh-oh!! I forgot at to submit to COMPULSORY gmail.com URINALYSIS!