Re: How to covert ASCII to integer in Python?

2008-05-31 Thread Philipp Pagel
Mensanator [EMAIL PROTECTED] wrote: On May 30, 10:03???am, Philipp Pagel [EMAIL PROTECTED] wrote: 'P' is obviously not an ASCII representation of a number. It is in base 36. Sure, but if that was the OP's intent he would most likely have mentioned it... As others have already guessed, it's

How to covert ASCII to integer in Python?

2008-05-30 Thread Skonieczny, Chris
YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try : a='P'# P is ASCII , isn't it ? b=int(a) and what you will get ? An error !!! Or probably you yourself should - quote : You probably

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread David C. Ullrich
In article [EMAIL PROTECTED], Skonieczny, Chris [EMAIL PROTECTED] wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html Why? There's nothing wrong there. It is not true - eg. try : a='P'# P is ASCII ,

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Philipp Pagel
Skonieczny, Chris [EMAIL PROTECTED] wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try : a='P'# P is ASCII , isn't it ? b=int(a) and what you will get ? An error !!! 'P' is

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Mensanator
On May 30, 10:03�am, Philipp Pagel [EMAIL PROTECTED] wrote: Skonieczny, Chris [EMAIL PROTECTED] wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html� It is not true - eg. try : a='P' � � � � � �# P is ASCII , isn't it ?

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Joshua Kugler
Skonieczny, Chris wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try : a='P'# P is ASCII , isn't it ? b=int(a) and what you will get ? An error !!! Or probably you yourself

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Mensanator
On May 30, 6:44 pm, Joshua Kugler [EMAIL PROTECTED] wrote: Skonieczny, Chris wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try : a='P'            # P is ASCII , isn't it ? b=int(a) and

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Mensanator
On May 30, 7:59 pm, Mensanator [EMAIL PROTECTED] wrote: On May 30, 6:44 pm, Joshua Kugler [EMAIL PROTECTED] wrote: Skonieczny, Chris wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try

How to covert ASCII to integer in Python?

2007-02-22 Thread John
Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread Larry Bates
John wrote: Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! You probably should go through the tutorial ASAP that is located here: http://docs.python.org/tut/ Convert ascii string to integer: a='1' b=int(a) Convert integer to ascii

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread keirr
On Feb 22, 5:43 pm, John [EMAIL PROTECTED] wrote: Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! Try int. ie. try: int_val = int(str_val) except ValueError: # conversion failed Keir. -- Keir Robinson Sometimes a scream is better than a

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread hg
John wrote: Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! int('10') 10 str(10) '10' -- http://mail.python.org/mailman/listinfo/python-list

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread Jeff McNeil
Or perhaps... ord (a) 97 chr (97) 'a' On 2/22/07, hg [EMAIL PROTECTED] wrote: John wrote: Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! int('10') 10 str(10) '10' -- http://mail.python.org/mailman/listinfo/python-list --

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread John
I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? John [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! --

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread Lloyd Zusman
John [EMAIL PROTECTED] writes: I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? The inverse of ord is chr: % python Python 2.5 (r25:51908, Jan 5 2007, 00:12:45) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type help, copyright,

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread Larry Bates
John wrote: I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? John [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there any built in function that converts ASCII to integer or vice versa in Python? Thanks! The phrasing of your

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread Paul Rubin
John [EMAIL PROTECTED] writes: I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? chr(i) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread MRAB
On Feb 22, 6:35 pm, Lloyd Zusman [EMAIL PROTECTED] wrote: John [EMAIL PROTECTED] writes: I just found ord(c), which convert ascii to integer. Anybody know what the reverse is? The inverse of ord is chr: % python Python 2.5 (r25:51908, Jan 5 2007, 00:12:45) [GCC 3.2.2 20030222

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread John Machin
On Feb 23, 5:23 am, John [EMAIL PROTECTED] wrote: I just found ord(c), which convert ascii to integer. ord('\xff') - 255 ord(unichr(666)) - 666 What ascii? What is stopping you from reading the documentation section on built- in functions (http://docs.python.org/lib/built-in-funcs.html)? That

Re: How to covert ASCII to integer in Python?

2007-02-22 Thread hg
yours and that of others trying to guess Some people spend many buck bying guessing games ... be nice ! hg -- http://mail.python.org/mailman/listinfo/python-list