Using format strings in Python I can easily print a number in \"scientific notation\", e.g.
>> print \'%g\'%1e9 1e+09
What is the simples
You can write a frexp10 function:
frexp10
def frexp10(x): exp = int(math.floor(math.log10(abs(x)))) return x / 10**exp, exp
Formatting in LaTeX style is then:
'{0}^{{{1:+03}}}'.format(*frexp10(-1.234e9))