compiling .cgi files
Andreas Jung
andreas at andreas-jung.com
Wed Jan 10 15:19:56 EST 2001
On Wed, Jan 10, 2001 at 06:43:48PM -0000, carlhiga at yahoo.com wrote:
> Hello,
>
> I'm running some python cgi scripts that need to have the '.cgi'
> extension in their filename.
>
> Is there anyway to get them to be byte code compiled? I understand
> that if they were '.py' files I could simply import them using the
> interpreter and it would produce the '.pyc' files. But I don't know
> how to do this with '.cgi' files.
.pyc files are created when you import a module inside a Python module/program.
In general you should not use the .cgi extension for Python modules but .py .
Assuming your webserver needs the .cgi extension for scripts to be used
as CGI script you might write a small shell wrapper around your Python
program.
Andreas
More information about the Python-list
mailing list