[Tutor] Import vs #include

Warren Marshall epicboy at gmail.com
Fri Sep 18 20:14:49 CEST 2009


I'm trying to get my head around the organization of a larger Python  
project.

1. Am I right in thinking that in Python, you don't have the concept  
of something like a precompiled header and that every file that wants  
to use, say "vector.py" needs to import that module?

2. How are Python projects typically organized  in terms of having  
many files.  Are sub-directories for different kinds of files  
(rendering files go here, file management files go here, etc), or does  
that not play nicely with the import command?

3. As you can tell, I've done a lot of C/C++/C# and I'm trying to  
shake loose the analog that I've built up in my head that import is  
Python's answer to #include.  It isn't, is it?

- Warren
(epicboy at gmail.com)





More information about the Tutor mailing list