Java Integer.ParseInt translation to python

Sean Blakey pythonista at gmail.com
Mon Jan 31 19:26:39 EST 2005


On Mon, 31 Jan 2005 19:23:35 -0500, jose isaias cabrera
<jicman at cinops.xerox.com> wrote:
> 
> Greetings!
> 
> I've looked through the internet (not long, though) but I have not been able
> to find a python translation to
> 
> buffer[0] = (byte)Integer.parseInt(string,16);
> 
> Has anyone ported any java programs to python and has translated this?
> 
> any help would be greatly appreciated.
> 
> thanks.
> 
> josé
> 

buffer[0] = int(string, 16)

http://docs.python.org/lib/built-in-funcs.html

-- 
Sean Blakey
Saint of Mild Amusement, Evil Genius, Big Geek
Python/Java/C++/C(Unix/Windows/Palm/Web) developer
quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0])



More information about the Python-list mailing list