Separation of Code in CGI App

Paul McNett p at ulmcnett.com
Fri Jul 22 14:45:41 EDT 2005


Rob Cowie wrote:

> So to be clear, if a .py module is in the same directory as my python
> cgi script, I can import it thus 'import XXX.py'?

Not quite. If you had a XXX.py, XXX.pyc, and/or XXX.pyo in the same 
directory as your Python cgi script, you'd import it by issuing:

import XXX


-- 
Paul McNett
http://paulmcnett.com




More information about the Python-list mailing list