compiling .cgi files
Tim Roberts
timr at probo.com
Thu Jan 11 00:22:54 EST 2001
carlhiga at yahoo.com wrote:
>
>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.
What about this? It's not too ugly, and the "import" will cause the pyc to
be generated and used.
myscript.cgi:
#! /usr/bin/python
import myscript
myscript.py:
#! /usr/bin/python
# ... rest of the script ..
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list