The regular python math and number modules will overflow on exp (300000).
You need an arbitrary precision floating point library.
Prereq: pip install mpmath
from mpmath import *
mp.dps=300
print exp(300000)
2.21090954962043147554031964344003334958746533182776533253160702399084245726328190320934903726540800347936047182773804396858994958295396516475277561815722954583856797032504775443385287094864178178111231967140927970972263439977028621274619241097429676587262948251263990280758512853239132411057394977398e+130288
see also http://code.google.com/p/mpmath/