How to convert string to float in Python 1.2

Bill Walker kwalker at earth1.net
Sat Jan 18 17:59:50 EST 2003


I'm using Python 1.2 on a ZEOS notebook which runs MS DOS 5.0. Python 1.5 or
higher will NOT install in DOS mode.

I have a string that I need to convert to a float.

f = float('1.234')

for example.  This works in Python 1.5 but does not work in Python 1.2. Nor
is there a built-in function or a string module that will work (that I have
found). Any tricks to doing this conversion in version 1.2, short of writing
my on string to float module?






-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----




More information about the Python-list mailing list