parsing engineering symbols
Erik Max Francis
max at alcyone.com
Tue Dec 20 17:13:25 EST 2005
Suresh Jeevanandam wrote:
> I want to convert a string to float value. The string contains
> engineering symbols.
> For example,
>
> s = '12k'
>
> I want some function which would return 12000
> function(s)
> => 12000.0
> I searched the web, but could not find any function.
There's some extensive code in the SI class in BOTEC which does this:
http://www.alcyone.com/software/botec/
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Chance favors the trained mind.
-- Louis Pasteur
More information about the Python-list
mailing list