importing modules question

warhero beingthexemplarylists at gmail.com
Thu Oct 18 08:41:10 CEST 2007


Hey all, sorry for the totally newb question. I recently switched over
to python from ruby. I'm having problems figuring out how module
importing works.. as a simple example I've got these files:

/example/loader.py
/example/loadee.py

loadee.py
class loadee(object):
    def __init__(self):
        print "loadee"

loader.py
import loadee
if __name__ == "__main__":
    l = loadee()


When I run the loader file I get a TypeError: TypeError: 'module'
object is not callable

hm. Sorry, this is totally newb, this is the only switching pains I've
had.




More information about the Python-list mailing list