[Tutor] confusion about imports

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jul 9 19:51:48 CEST 2012


On 09/07/2012 16:56, Chris Hare wrote:
>
> So, I have to admit, imports have me really confused.  I am trying to break apart a 10,000+ line single file into various files, one for each class, and one containing a whole bunch of functions which are used by a lot of classes.  Some of those functions use calls to methods in a Class.  Even though the Class has been imported, I get a nameError where trying to use the class.  I have read about Classes and packages and modules, but import just has me confused.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

Please don't break the file up for the sake of doing it, you're writing 
python not java :-)

-- 
Cheers.

Mark Lawrence.





More information about the Tutor mailing list