On Jul 26, 6:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Lie wrote: > > If you have any idea what black magic is happening in my computer > > right now, I'd appreciate it. > > command completion? (no ubuntu within reach right now, so I cannot > check how they've set it up). > > try starting python with the "-v" option, so you can see exactly when > the import occurs. > > </F>
I run python as: python -v &> pyth.log As I've predicted, they imported the modules when there is an Error, any Error, it seems. I have made a hypothesis that it seems that there is something wrong with the Error Handler, it seems that Python have leaked the modules the Error handler used to my session. Although I am unable to access the modules itself unless I imported those modules by myself, any sub- modules that is loaded by the Error Handler is already loaded, so in my session, those modules are merely rebound to a name in my namespace. Question: Is there a way to list loaded modules, including those that aren't in my namespace? Remarks: In another, possibly unrelated, possibly related case, every time I typed: "help(modules)" (to list all modules installed on the system) I've got an error, I've previously made a thread about this in c.l.py, but I don't really mind that much back then since listing installed modules aren't that important for me (I can lookup standardly installed modules in the internet and the number of 3rd party modules installed, I can count with the fingers from a hand). The thread was: http://groups.google.com/group/comp.lang.python/browse_thread/thread/e981edb45fb3854a/ This is an example of the terminal session [EMAIL PROTECTED]:~$ python -v &> pyth.log be_nice = 100 doerror xml import xml xml.dom import email email.mime exit() Python doesn't emit the prompts >>> because they're redirected to pyth.log Here is the SUMMARY of pyth.log (the real one is very long, so I append it at the end) * Typed "python -v &> pyth.log" to terminal * Python imports many modules: zipimport, site, os, errno, posix, posixpath, stat, UserDict, copy_reg, types, _types, sitecustomize, apport_python_hook, warnings, linecache, encodings (# directory /usr/lib/python2.5/encodings), encodings (# precompiled from /usr/lib/python2.5/encodings/ __init__.pyc), codecs, _codecs, encodings.aliases, encodings.utf_8 * Standard Python Heading: Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. * I don't know what this is: dlopen("/usr/lib/python2.5/lib-dynload/ readline.so", 2); * Python imported readline module * Python prompt: I typed "be_nice = 100", no output * Python prompt: I typed "doerror" (since doerror is not defined, it raises NameError, I've tried many other errors, like arithmetic error, etc and they did similar thing), python response with loading a lot of modules: apport (# directory /usr/lib/python2.5/site-packages/apport), apport (# precompiled from /usr/lib/python2.5/site-packages/apport/ __init__.pyc), apport.report, subprocess, traceback, gc, time, select, fcntl, pickle, marshal, struct, _struct, re, sre_compile, _sre, sre_constants, sre_parse, binascii, cStringIO, tempfile, random, math, _random, thread, urllib, string, strop, socket, _socket, _ssl, urlparse, pwd, grp, fnmatch, glob, atexit, xml, xml.dom, xml.dom.domreg, xml.dom.minicompat, xml.dom.minidom, xml.dom.xmlbuilder, copy, xml.dom.NodeFilter, xml.parsers (# directory /usr/lib/python2.5/xml/parsers), xml.parsers (# precompiled from /usr/lib/python2.5/xml/parsers/ __init__.pyc), xml.parsers.expat, pyexpat, problem_report, zlib, base64, gzip, email, email.mime (# directory /usr/lib/python2.5/email/mime), email.mime (# precompiled from /usr/lib/python2.5/email/mime/ __init__.pyc), email.encoders, email.quopri, email.mime.multipart, email.mime.base, email.message, uu, email.charset, email.base64mime, email.utils, email._parseaddr, email.quoprimime, email.errors, email.iterators, email.mime.text, email.mime.nonmultipart, unittest, apport.fileutils, apport.packaging.impl, apt (# directory /usr/lib/python2.5/site-packages/apt), apt (# precompiled from /usr/lib/python2.5/site-packages/apt/ __init__.pyc), apt_pkg, apt.package, gettext, locale, _locale, operator, apt.cache, apt.progress, apt.cdrom, apport.packaging, shutil. Among these imports, there are lines like these interleaved (generally right before the import of the modules with the same name): dlopen("/usr/lib/python2.5/lib-dynload/time.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/select.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/fcntl.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/_struct.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/binascii.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/cStringIO.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/math.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/_random.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/strop.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/_socket.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/_ssl.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/grp.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/pyexpat.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/zlib.so", 2); dlopen("/usr/lib/python2.5/site-packages/apt_pkg.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/_locale.so", 2); dlopen("/usr/lib/python2.5/lib-dynload/operator.so", 2); * After those imports is the standard Python traceback (because of the doerror we made earlier) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'doerror' is not defined * The next few lines (edited[1] form the original, for viewing convenience): >>> xml Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'xml' is not defined >>> import xml >>> xml.dom <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> >>> import email >>> email.mime <module 'email.mime' from '/usr/lib/python2.5/email/mime/ __init__.pyc'> [1] Since this is a dump from IO redirection, the texts coming from stdin is absent, I inserted those stdin manually, so it looks more like terminal transcript, instead of IO redirection. * Python prompt - I typed "exit()", it displayed messages of it clearing itself and cleaning up the modules it have loaded TERMINAL TRANSCRIPT (the one already edited, to get the original, apply the diff far below): # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/lib/python2.5/site.pyc matches /usr/lib/python2.5/site.py import site # precompiled from /usr/lib/python2.5/site.pyc # /usr/lib/python2.5/os.pyc matches /usr/lib/python2.5/os.py import os # precompiled from /usr/lib/python2.5/os.pyc import errno # builtin import posix # builtin # /usr/lib/python2.5/posixpath.pyc matches /usr/lib/python2.5/ posixpath.py import posixpath # precompiled from /usr/lib/python2.5/posixpath.pyc # /usr/lib/python2.5/stat.pyc matches /usr/lib/python2.5/stat.py import stat # precompiled from /usr/lib/python2.5/stat.pyc # /usr/lib/python2.5/UserDict.pyc matches /usr/lib/python2.5/ UserDict.py import UserDict # precompiled from /usr/lib/python2.5/UserDict.pyc # /usr/lib/python2.5/copy_reg.pyc matches /usr/lib/python2.5/ copy_reg.py import copy_reg # precompiled from /usr/lib/python2.5/copy_reg.pyc # /usr/lib/python2.5/types.pyc matches /usr/lib/python2.5/types.py import types # precompiled from /usr/lib/python2.5/types.pyc import _types # builtin # /usr/lib/python2.5/sitecustomize.pyc matches /usr/lib/python2.5/ sitecustomize.py import sitecustomize # precompiled from /usr/lib/python2.5/ sitecustomize.pyc # /usr/lib/python2.5/site-packages/apport_python_hook.pyc matches /usr/ lib/python2.5/site-packages/apport_python_hook.py import apport_python_hook # precompiled from /usr/lib/python2.5/site- packages/apport_python_hook.pyc # /usr/lib/python2.5/warnings.pyc matches /usr/lib/python2.5/ warnings.py import warnings # precompiled from /usr/lib/python2.5/warnings.pyc # /usr/lib/python2.5/linecache.pyc matches /usr/lib/python2.5/ linecache.py import linecache # precompiled from /usr/lib/python2.5/linecache.pyc import encodings # directory /usr/lib/python2.5/encodings # /usr/lib/python2.5/encodings/__init__.pyc matches /usr/lib/python2.5/ encodings/__init__.py import encodings # precompiled from /usr/lib/python2.5/encodings/ __init__.pyc # /usr/lib/python2.5/codecs.pyc matches /usr/lib/python2.5/codecs.py import codecs # precompiled from /usr/lib/python2.5/codecs.pyc import _codecs # builtin # /usr/lib/python2.5/encodings/aliases.pyc matches /usr/lib/python2.5/ encodings/aliases.py import encodings.aliases # precompiled from /usr/lib/python2.5/ encodings/aliases.pyc # /usr/lib/python2.5/encodings/utf_8.pyc matches /usr/lib/python2.5/ encodings/utf_8.py import encodings.utf_8 # precompiled from /usr/lib/python2.5/encodings/ utf_8.pyc Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. dlopen("/usr/lib/python2.5/lib-dynload/readline.so", 2); import readline # dynamically loaded from /usr/lib/python2.5/lib- dynload/readline.so >>> be_nice = 100 >>> doerror import apport # directory /usr/lib/python2.5/site-packages/apport # /usr/lib/python2.5/site-packages/apport/__init__.pyc matches /usr/ lib/python2.5/site-packages/apport/__init__.py import apport # precompiled from /usr/lib/python2.5/site-packages/ apport/__init__.pyc # /usr/lib/python2.5/site-packages/apport/report.pyc matches /usr/lib/ python2.5/site-packages/apport/report.py import apport.report # precompiled from /usr/lib/python2.5/site- packages/apport/report.pyc # /usr/lib/python2.5/subprocess.pyc matches /usr/lib/python2.5/ subprocess.py import subprocess # precompiled from /usr/lib/python2.5/subprocess.pyc # /usr/lib/python2.5/traceback.pyc matches /usr/lib/python2.5/ traceback.py import traceback # precompiled from /usr/lib/python2.5/traceback.pyc import gc # builtin dlopen("/usr/lib/python2.5/lib-dynload/time.so", 2); import time # dynamically loaded from /usr/lib/python2.5/lib-dynload/ time.so dlopen("/usr/lib/python2.5/lib-dynload/select.so", 2); import select # dynamically loaded from /usr/lib/python2.5/lib-dynload/ select.so dlopen("/usr/lib/python2.5/lib-dynload/fcntl.so", 2); import fcntl # dynamically loaded from /usr/lib/python2.5/lib-dynload/ fcntl.so # /usr/lib/python2.5/pickle.pyc matches /usr/lib/python2.5/pickle.py import pickle # precompiled from /usr/lib/python2.5/pickle.pyc import marshal # builtin # /usr/lib/python2.5/struct.pyc matches /usr/lib/python2.5/struct.py import struct # precompiled from /usr/lib/python2.5/struct.pyc dlopen("/usr/lib/python2.5/lib-dynload/_struct.so", 2); import _struct # dynamically loaded from /usr/lib/python2.5/lib- dynload/_struct.so # /usr/lib/python2.5/re.pyc matches /usr/lib/python2.5/re.py import re # precompiled from /usr/lib/python2.5/re.pyc # /usr/lib/python2.5/sre_compile.pyc matches /usr/lib/python2.5/ sre_compile.py import sre_compile # precompiled from /usr/lib/python2.5/ sre_compile.pyc import _sre # builtin # /usr/lib/python2.5/sre_constants.pyc matches /usr/lib/python2.5/ sre_constants.py import sre_constants # precompiled from /usr/lib/python2.5/ sre_constants.pyc # /usr/lib/python2.5/sre_parse.pyc matches /usr/lib/python2.5/ sre_parse.py import sre_parse # precompiled from /usr/lib/python2.5/sre_parse.pyc dlopen("/usr/lib/python2.5/lib-dynload/binascii.so", 2); import binascii # dynamically loaded from /usr/lib/python2.5/lib- dynload/binascii.so dlopen("/usr/lib/python2.5/lib-dynload/cStringIO.so", 2); import cStringIO # dynamically loaded from /usr/lib/python2.5/lib- dynload/cStringIO.so # /usr/lib/python2.5/tempfile.pyc matches /usr/lib/python2.5/ tempfile.py import tempfile # precompiled from /usr/lib/python2.5/tempfile.pyc # /usr/lib/python2.5/random.pyc matches /usr/lib/python2.5/random.py import random # precompiled from /usr/lib/python2.5/random.pyc dlopen("/usr/lib/python2.5/lib-dynload/math.so", 2); import math # dynamically loaded from /usr/lib/python2.5/lib-dynload/ math.so dlopen("/usr/lib/python2.5/lib-dynload/_random.so", 2); import _random # dynamically loaded from /usr/lib/python2.5/lib- dynload/_random.so import thread # builtin # /usr/lib/python2.5/urllib.pyc matches /usr/lib/python2.5/urllib.py import urllib # precompiled from /usr/lib/python2.5/urllib.pyc # /usr/lib/python2.5/string.pyc matches /usr/lib/python2.5/string.py import string # precompiled from /usr/lib/python2.5/string.pyc dlopen("/usr/lib/python2.5/lib-dynload/strop.so", 2); import strop # dynamically loaded from /usr/lib/python2.5/lib-dynload/ strop.so # /usr/lib/python2.5/socket.pyc matches /usr/lib/python2.5/socket.py import socket # precompiled from /usr/lib/python2.5/socket.pyc dlopen("/usr/lib/python2.5/lib-dynload/_socket.so", 2); import _socket # dynamically loaded from /usr/lib/python2.5/lib- dynload/_socket.so dlopen("/usr/lib/python2.5/lib-dynload/_ssl.so", 2); import _ssl # dynamically loaded from /usr/lib/python2.5/lib-dynload/ _ssl.so # /usr/lib/python2.5/urlparse.pyc matches /usr/lib/python2.5/ urlparse.py import urlparse # precompiled from /usr/lib/python2.5/urlparse.pyc import pwd # builtin dlopen("/usr/lib/python2.5/lib-dynload/grp.so", 2); import grp # dynamically loaded from /usr/lib/python2.5/lib-dynload/ grp.so # /usr/lib/python2.5/fnmatch.pyc matches /usr/lib/python2.5/fnmatch.py import fnmatch # precompiled from /usr/lib/python2.5/fnmatch.pyc # /usr/lib/python2.5/glob.pyc matches /usr/lib/python2.5/glob.py import glob # precompiled from /usr/lib/python2.5/glob.pyc # /usr/lib/python2.5/atexit.pyc matches /usr/lib/python2.5/atexit.py import atexit # precompiled from /usr/lib/python2.5/atexit.pyc import xml # directory /usr/lib/python2.5/xml # /usr/lib/python2.5/xml/__init__.pyc matches /usr/lib/python2.5/xml/ __init__.py import xml # precompiled from /usr/lib/python2.5/xml/__init__.pyc import xml.dom # directory /usr/lib/python2.5/xml/dom # /usr/lib/python2.5/xml/dom/__init__.pyc matches /usr/lib/python2.5/ xml/dom/__init__.py import xml.dom # precompiled from /usr/lib/python2.5/xml/dom/ __init__.pyc # /usr/lib/python2.5/xml/dom/domreg.pyc matches /usr/lib/python2.5/xml/ dom/domreg.py import xml.dom.domreg # precompiled from /usr/lib/python2.5/xml/dom/ domreg.pyc # /usr/lib/python2.5/xml/dom/minicompat.pyc matches /usr/lib/python2.5/ xml/dom/minicompat.py import xml.dom.minicompat # precompiled from /usr/lib/python2.5/xml/ dom/minicompat.pyc # /usr/lib/python2.5/xml/dom/minidom.pyc matches /usr/lib/python2.5/ xml/dom/minidom.py import xml.dom.minidom # precompiled from /usr/lib/python2.5/xml/dom/ minidom.pyc # /usr/lib/python2.5/xml/dom/xmlbuilder.pyc matches /usr/lib/python2.5/ xml/dom/xmlbuilder.py import xml.dom.xmlbuilder # precompiled from /usr/lib/python2.5/xml/ dom/xmlbuilder.pyc # /usr/lib/python2.5/copy.pyc matches /usr/lib/python2.5/copy.py import copy # precompiled from /usr/lib/python2.5/copy.pyc # /usr/lib/python2.5/xml/dom/NodeFilter.pyc matches /usr/lib/python2.5/ xml/dom/NodeFilter.py import xml.dom.NodeFilter # precompiled from /usr/lib/python2.5/xml/ dom/NodeFilter.pyc import xml.parsers # directory /usr/lib/python2.5/xml/parsers # /usr/lib/python2.5/xml/parsers/__init__.pyc matches /usr/lib/ python2.5/xml/parsers/__init__.py import xml.parsers # precompiled from /usr/lib/python2.5/xml/parsers/ __init__.pyc # /usr/lib/python2.5/xml/parsers/expat.pyc matches /usr/lib/python2.5/ xml/parsers/expat.py import xml.parsers.expat # precompiled from /usr/lib/python2.5/xml/ parsers/expat.pyc dlopen("/usr/lib/python2.5/lib-dynload/pyexpat.so", 2); import pyexpat # dynamically loaded from /usr/lib/python2.5/lib- dynload/pyexpat.so # /usr/lib/python2.5/site-packages/problem_report.pyc matches /usr/lib/ python2.5/site-packages/problem_report.py import problem_report # precompiled from /usr/lib/python2.5/site- packages/problem_report.pyc dlopen("/usr/lib/python2.5/lib-dynload/zlib.so", 2); import zlib # dynamically loaded from /usr/lib/python2.5/lib-dynload/ zlib.so # /usr/lib/python2.5/base64.pyc matches /usr/lib/python2.5/base64.py import base64 # precompiled from /usr/lib/python2.5/base64.pyc # /usr/lib/python2.5/gzip.pyc matches /usr/lib/python2.5/gzip.py import gzip # precompiled from /usr/lib/python2.5/gzip.pyc import email # directory /usr/lib/python2.5/email # /usr/lib/python2.5/email/__init__.pyc matches /usr/lib/python2.5/ email/__init__.py import email # precompiled from /usr/lib/python2.5/email/__init__.pyc import email.mime # directory /usr/lib/python2.5/email/mime # /usr/lib/python2.5/email/mime/__init__.pyc matches /usr/lib/ python2.5/email/mime/__init__.py import email.mime # precompiled from /usr/lib/python2.5/email/mime/ __init__.pyc # /usr/lib/python2.5/email/encoders.pyc matches /usr/lib/python2.5/ email/encoders.py import email.encoders # precompiled from /usr/lib/python2.5/email/ encoders.pyc # /usr/lib/python2.5/quopri.pyc matches /usr/lib/python2.5/quopri.py import quopri # precompiled from /usr/lib/python2.5/quopri.pyc # /usr/lib/python2.5/email/mime/multipart.pyc matches /usr/lib/ python2.5/email/mime/multipart.py import email.mime.multipart # precompiled from /usr/lib/python2.5/ email/mime/multipart.pyc # /usr/lib/python2.5/email/mime/base.pyc matches /usr/lib/python2.5/ email/mime/base.py import email.mime.base # precompiled from /usr/lib/python2.5/email/ mime/base.pyc # /usr/lib/python2.5/email/message.pyc matches /usr/lib/python2.5/ email/message.py import email.message # precompiled from /usr/lib/python2.5/email/ message.pyc # /usr/lib/python2.5/uu.pyc matches /usr/lib/python2.5/uu.py import uu # precompiled from /usr/lib/python2.5/uu.pyc # /usr/lib/python2.5/email/charset.pyc matches /usr/lib/python2.5/ email/charset.py import email.charset # precompiled from /usr/lib/python2.5/email/ charset.pyc # /usr/lib/python2.5/email/base64mime.pyc matches /usr/lib/python2.5/ email/base64mime.py import email.base64mime # precompiled from /usr/lib/python2.5/email/ base64mime.pyc # /usr/lib/python2.5/email/utils.pyc matches /usr/lib/python2.5/email/ utils.py import email.utils # precompiled from /usr/lib/python2.5/email/ utils.pyc # /usr/lib/python2.5/email/_parseaddr.pyc matches /usr/lib/python2.5/ email/_parseaddr.py import email._parseaddr # precompiled from /usr/lib/python2.5/email/ _parseaddr.pyc # /usr/lib/python2.5/email/quoprimime.pyc matches /usr/lib/python2.5/ email/quoprimime.py import email.quoprimime # precompiled from /usr/lib/python2.5/email/ quoprimime.pyc # /usr/lib/python2.5/email/errors.pyc matches /usr/lib/python2.5/email/ errors.py import email.errors # precompiled from /usr/lib/python2.5/email/ errors.pyc # /usr/lib/python2.5/email/iterators.pyc matches /usr/lib/python2.5/ email/iterators.py import email.iterators # precompiled from /usr/lib/python2.5/email/ iterators.pyc # /usr/lib/python2.5/email/mime/text.pyc matches /usr/lib/python2.5/ email/mime/text.py import email.mime.text # precompiled from /usr/lib/python2.5/email/ mime/text.pyc # /usr/lib/python2.5/email/mime/nonmultipart.pyc matches /usr/lib/ python2.5/email/mime/nonmultipart.py import email.mime.nonmultipart # precompiled from /usr/lib/python2.5/ email/mime/nonmultipart.pyc # /usr/lib/python2.5/unittest.pyc matches /usr/lib/python2.5/ unittest.py import unittest # precompiled from /usr/lib/python2.5/unittest.pyc # /usr/lib/python2.5/site-packages/apport/fileutils.pyc matches /usr/ lib/python2.5/site-packages/apport/fileutils.py import apport.fileutils # precompiled from /usr/lib/python2.5/site- packages/apport/fileutils.pyc # /usr/lib/python2.5/site-packages/apport/packaging_impl.pyc matches / usr/lib/python2.5/site-packages/apport/packaging_impl.py import apport.packaging_impl # precompiled from /usr/lib/python2.5/ site-packages/apport/packaging_impl.pyc import apt # directory /usr/lib/python2.5/site-packages/apt # /usr/lib/python2.5/site-packages/apt/__init__.pyc matches /usr/lib/ python2.5/site-packages/apt/__init__.py import apt # precompiled from /usr/lib/python2.5/site-packages/apt/ __init__.pyc dlopen("/usr/lib/python2.5/site-packages/apt_pkg.so", 2); import apt_pkg # dynamically loaded from /usr/lib/python2.5/site- packages/apt_pkg.so # /usr/lib/python2.5/site-packages/apt/package.pyc matches /usr/lib/ python2.5/site-packages/apt/package.py import apt.package # precompiled from /usr/lib/python2.5/site-packages/ apt/package.pyc # /usr/lib/python2.5/gettext.pyc matches /usr/lib/python2.5/gettext.py import gettext # precompiled from /usr/lib/python2.5/gettext.pyc # /usr/lib/python2.5/locale.pyc matches /usr/lib/python2.5/locale.py import locale # precompiled from /usr/lib/python2.5/locale.pyc dlopen("/usr/lib/python2.5/lib-dynload/_locale.so", 2); import _locale # dynamically loaded from /usr/lib/python2.5/lib- dynload/_locale.so dlopen("/usr/lib/python2.5/lib-dynload/operator.so", 2); import operator # dynamically loaded from /usr/lib/python2.5/lib- dynload/operator.so # /usr/lib/python2.5/site-packages/apt/cache.pyc matches /usr/lib/ python2.5/site-packages/apt/cache.py import apt.cache # precompiled from /usr/lib/python2.5/site-packages/ apt/cache.pyc # /usr/lib/python2.5/site-packages/apt/progress.pyc matches /usr/lib/ python2.5/site-packages/apt/progress.py import apt.progress # precompiled from /usr/lib/python2.5/site- packages/apt/progress.pyc # /usr/lib/python2.5/site-packages/apt/cdrom.pyc matches /usr/lib/ python2.5/site-packages/apt/cdrom.py import apt.cdrom # precompiled from /usr/lib/python2.5/site-packages/ apt/cdrom.pyc # /usr/lib/python2.5/site-packages/apport/packaging.pyc matches /usr/ lib/python2.5/site-packages/apport/packaging.py import apport.packaging # precompiled from /usr/lib/python2.5/site- packages/apport/packaging.pyc # /usr/lib/python2.5/shutil.pyc matches /usr/lib/python2.5/shutil.py import shutil # precompiled from /usr/lib/python2.5/shutil.pyc Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'doerror' is not defined >>> xml Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'xml' is not defined >>> import xml >>> xml.dom <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> >>> import email >>> email.mime <module 'email.mime' from '/usr/lib/python2.5/email/mime/ __init__.pyc'> >>> exit() # 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 # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] apport # cleanup[1] zipimport # cleanup[1] quopri # cleanup[1] cStringIO # cleanup[1] apport.report # cleanup[1] math # cleanup[1] exceptions # cleanup[1] _locale # cleanup[1] sre_constants # cleanup[1] _codecs # cleanup[1] pwd # cleanup[1] _struct # cleanup[1] _types # cleanup[1] posix # cleanup[1] site # cleanup[1] problem_report # cleanup[1] pyexpat # cleanup[1] strop # cleanup[1] grp # cleanup[1] readline # cleanup[1] sitecustomize # cleanup[1] apport.packaging # cleanup[1] urlparse # cleanup[1] gzip # cleanup[1] signal # cleanup[1] apport.packaging_impl # cleanup[1] zlib # cleanup[1] apport.fileutils # cleanup[1] atexit # cleanup[1] unittest # cleanup[1] apport_python_hook # cleanup[1] shutil # cleanup[1] glob # cleanup[1] subprocess # cleanup[1] gc # cleanup[1] tempfile # cleanup[1] thread # cleanup[1] traceback # cleanup[1] fnmatch # cleanup[1] pickle # cleanup[1] marshal # cleanup[2] email.iterators # cleanup[2] random # cleanup[2] types # cleanup[2] email.mime # cleanup[2] xml # cleanup[2] struct # cleanup[2] base64 # cleanup[2] apt.cache # cleanup[2] pyexpat.errors # cleanup[2] apt_pkg # cleanup[2] encodings.utf_8 # cleanup[2] email.quoprimime # cleanup[2] email.mime.text # cleanup[2] email.encoders # cleanup[2] pyexpat.model # cleanup[2] locale # cleanup[2] email.charset # cleanup[2] xml.parsers.expat # cleanup[2] encodings # cleanup[2] urllib # cleanup[2] re # cleanup[2] email.mime.base # cleanup[2] email.errors # cleanup[2] email # cleanup[2] fcntl # cleanup[2] apt.progress # cleanup[2] UserDict # cleanup[2] codecs # cleanup[2] xml.dom.domreg # cleanup[2] socket # cleanup[2] xml.dom.xmlbuilder # cleanup[2] os # cleanup[2] _sre # cleanup[2] xml.parsers # cleanup[2] operator # cleanup[2] select # cleanup[2] posixpath # cleanup[2] errno # cleanup[2] _socket # cleanup[2] binascii # cleanup[2] email._parseaddr # cleanup[2] os.path # cleanup[2] apt.package # cleanup[2] xml.dom.NodeFilter # cleanup[2] email.utils # cleanup[2] copy # cleanup[2] apt.cdrom # cleanup[2] uu # cleanup[2] xml.dom.minidom # cleanup[2] apt # cleanup[2] encodings.aliases # cleanup[2] sre_parse # cleanup[2] copy_reg # cleanup[2] sre_compile # cleanup[2] _random # cleanup[2] email.message # cleanup[2] string # cleanup[2] email.mime.nonmultipart # cleanup[2] gettext # cleanup[2] xml.dom.minicompat # cleanup[2] stat # cleanup[2] _ssl # cleanup[2] warnings # cleanup[2] xml.dom # cleanup[2] email.base64mime # cleanup[2] email.mime.multipart # cleanup[2] linecache # cleanup[2] time # cleanup sys # cleanup __builtin__ # cleanup ints: 58 unfreed ints in 7 out of 17 blocks # cleanup floats: 33 unfreed floats in 2 out of 3 blocks 44,46c44 < >>> be_nice = 100 < >>> doerror < import apport # directory /usr/lib/python2.5/site-packages/apport --- > >>> >>> import apport # directory /usr/lib/python2.5/site-packages/apport 217,218c215 < >>> xml < Traceback (most recent call last): --- > >>> Traceback (most recent call last): 221,228c218,220 < >>> import xml < >>> xml.dom < <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> < >>> import email < >>> email.mime < <module 'email.mime' from '/usr/lib/python2.5/email/mime/ __init__.pyc'> < >>> exit() < # clear __builtin__._ --- > >>> >>> <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> > >>> >>> <module 'email.mime' from > >>> >>> '/usr/lib/python2.5/email/mime/__init__.pyc'> > >>> # clear __builtin__._ DIFF TO RAW TRANSCRIPT 44,46c44 < >>> be_nice = 100 < >>> doerror < import apport # directory /usr/lib/python2.5/site-packages/apport --- > >>> >>> import apport # directory /usr/lib/python2.5/site-packages/apport 217,218c215 < >>> xml < Traceback (most recent call last): --- > >>> Traceback (most recent call last): 221,228c218,220 < >>> import xml < >>> xml.dom < <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> < >>> import email < >>> email.mime < <module 'email.mime' from '/usr/lib/python2.5/email/mime/ __init__.pyc'> < >>> exit() < # clear __builtin__._ --- > >>> >>> <module 'xml.dom' from '/usr/lib/python2.5/xml/dom/__init__.pyc'> > >>> >>> <module 'email.mime' from > >>> >>> '/usr/lib/python2.5/email/mime/__init__.pyc'> > >>> # clear __builtin__._ -- http://mail.python.org/mailman/listinfo/python-list