micropython/micropython — pull request #157 by dhylands (2014-01-12 18:57:53+00:00)
Title: Added a hacky implementation for %g

This is uber-hacky, but I was dealing with some floats and wanted to see what they looked like.

print (0.1) from python was just printing a g

With this patch print(0.1) now prints 0.100000

I fully expect that this will get replaced (I seem to recall seeing some discussion elsewhere about conversions).

I noticed google has some BSD licensed routines here: http://code.google.com/p/stringencoders/ but I haven't looked at the compatability of the licenses.