Newbie - instanciating classes from other files

Devan L devlai at gmail.com
Wed Sep 14 23:33:39 EDT 2005


comanighttrain at gmail.com wrote:
> Hey guys, i just started learning python (i usually use java/C).
>
> this has got me stumped as its not mentioned in the documentation
> (unless im skimming it every time).
>
> How does one instanciate a class from another file

import somefile
foo = somefile.class(__init__arguments-should-go-here)

Don't include the .py, it's won't work.




More information about the Python-list mailing list