"pistacchio" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

| well, it doesn't matter if it's a single file or a package, but it
| _does_ matter if you have to put them under the path where python is
| installed because, in a typical shared web hosting environment (such the
| one that i use) you don't have access to system directories.

When you do an import, the *first* place the interpreter looks is the 
*current* directory, which usually is the directory containing the main 
file.  That is because the first entry in sys.path is ''.  So put 
'template.py' in the same directory as my_web_code.py.  If necessary, one 
can add an entry to the beginning of sys.path.

No need to touch the site-packages directory.  The only reason to put 
something there is to make modules available to any code in any directory 
without putting a copy in each directory containing python files.

tjr




--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to