[Python-Dev] shared data (was: Some thoughts on the codecs...)
Andrew M. Kuchling
akuchlin@mems-exchange.org
Tue, 16 Nov 1999 09:35:39 -0500 (EST)
Greg Ward writes:
>Next, the number of "open" calls:
> Solaris Linux IRIX
> Perl 16 10 9
> Python 107 71 48
Running 'python -v' explains this:
amarok akuchlin>python -v
# /usr/local/lib/python1.5/exceptions.pyc matches /usr/local/lib/python1.5/exceptions.py
import exceptions # precompiled from /usr/local/lib/python1.5/exceptions.pyc
# /usr/local/lib/python1.5/site.pyc matches /usr/local/lib/python1.5/site.py
import site # precompiled from /usr/local/lib/python1.5/site.pyc
# /usr/local/lib/python1.5/os.pyc matches /usr/local/lib/python1.5/os.py
import os # precompiled from /usr/local/lib/python1.5/os.pyc
import posix # builtin
# /usr/local/lib/python1.5/posixpath.pyc matches /usr/local/lib/python1.5/posixpath.py
import posixpath # precompiled from /usr/local/lib/python1.5/posixpath.pyc
# /usr/local/lib/python1.5/stat.pyc matches /usr/local/lib/python1.5/stat.py
import stat # precompiled from /usr/local/lib/python1.5/stat.pyc
# /usr/local/lib/python1.5/UserDict.pyc matches /usr/local/lib/python1.5/UserDict.py
import UserDict # precompiled from /usr/local/lib/python1.5/UserDict.pyc
Python 1.5.2 (#80, May 25 1999, 18:06:07) [GCC 2.8.1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
import readline # dynamically loaded from /usr/local/lib/python1.5/lib-dynload/readline.so
And each import tries several different forms of the module name:
stat("/usr/local/lib/python1.5/os", 0xEFFFD5E0) Err#2 ENOENT
open("/usr/local/lib/python1.5/os.so", O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/python1.5/osmodule.so", O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/python1.5/os.py", O_RDONLY) = 4
I don't see how this is fixable, unless we strip down site.py, which
drags in os, which drags in os.path and stat and UserDict.
--
A.M. Kuchling http://starship.python.net/crew/amk/
I'm going stir-crazy, and I've joined the ranks of the walking brain-dead, but
otherwise I'm just peachy.
-- Lyta Hall on parenthood, in SANDMAN #40: "Parliament of Rooks"