configuring mxCGIPython

Mark McEahern marklists at mceahern.com
Fri Apr 26 10:44:45 EDT 2002


[M.-A. Lemburg]
> Hmm, interesting. Looks like sys.path is empty at this point.
> I wonder whether this is a bug in the frozen cgipython built
> or just a consequence of freezing the interpreter.
>
> Could you try setting PYTHONPATH to the dir where cgipython
> lives ?

I tried that.  The first error related to site.py no longer occurs, but I
still get the second error.  Output appended at the end of the message.  I
don't really know what line 27 of cgipython.py is?

> Since the stuff currently done in site.py doesn't really
> make all that much sense here, I think cgipython should
> probably use an empty site.py file instead of the standard
> one (should enhance startup times even more).

Sadly, I don't know enough to really judge this.

> Good question. It probably doesn't even start looking for
> it since it's already preregistered in the built-in
> modules.

I'm building my own fresh copy of cgipython to see if that makes any
difference.  I'll let you know.

Again, I appreciate your feedback and help.

Cheers,

// mark

<output>

cgipython exists
import site # frozen
import os # frozen
import posix # builtin
import posixpath # frozen
import stat # frozen
import UserDict # frozen
Python 2.2 (#1, Feb 19 2002, 17:44:05)
[GCC 2.95.2 20000220 (Debian GNU/Linux)]
Copyright (c) 2001 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
import __main__ # frozen
Traceback (most recent call last):
  File "../../CGIPython/cgipython.py", line 27, in ?
IOError: [Errno 2] No such file or directory
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] signal
# cleanup[1] site
# cleanup[1] posix
# cleanup[1] exceptions
# cleanup[2] stat
# cleanup[2] posixpath
# cleanup[2] UserDict
# cleanup[2] os
# cleanup[2] os.path
# cleanup sys
# cleanup __builtin__
# cleanup ints: 3 unfreed ints in 1 out of 3 blocks
# cleanup floats






More information about the Python-list mailing list