math.pi does not work

Posted by djgaltron on 2007-10-10 00:41

Hi i have a simple example here

import math
print 2*math.pi*r

this will not compile or run on my osx tiger machine,

i have python 2.51 IDE installed

this is the error message i get

File "/Users/stephengalton/msc/python/", line 1, in
import math
File "/Users/stephengalton/msc/python/", line 2, in
print math.pi
AttributeError: 'module' object has no attribute 'pi'

any ideas