A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-September/017567.html below:

[Python-Dev] ModuleFinder patch

[Python-Dev] ModuleFinder patchThomas Heller thomas.heller@ion-tof.com
Wed, 19 Sep 2001 19:51:53 +0200
I've uploaded a freeze/ModuleFinder patch to sf, #462936.

This patch adds two improvements:

1. ModuleFinder now keeps track of which module is 
imported by whom.

2. ModuleFinder, when instantiated with the new 
scan_extdeps=1 argument, tries to track dependencies 
of builtin and extension modules.

I'd love to hear some comments especially on the last point,
so I'll shortly explain how it works.

ModuleFinder starts a separate python interpreter process
with a command line of '-S -v -c "import <builtin_or_extension>"',
pipes this through popen(), and scans the error-output for
lines of the form 'import blabla # ....'.
This is somewhat expensive, but it is the only way I've found
so far to find out about these dependencies.
Examples are:
The multiarray extension needs the _numpy extension.
Every extension using ExtensionClass needs this.
cPickle needs copy_reg and other modules.

Any other ideas?

Regards,

Thomas




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4