A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/098663.html below:

Installed modules list?

Installed modules list? Installed modules list?John J. Lee phrxy at csv.warwick.ac.uk
Tue Apr 17 12:36:51 EDT 2001
On Tue, 17 Apr 2001, Steve Purcell wrote:

> Carsten Gaebler wrote:
> > Is there a simple way of generating a list of all installed modules or do
> > I have to walk through all directories in sys.path?
>
> Option 2.
>
> (You can get the list of builtin modules using sys.builtin_module_names, but
> that's only part of the story, of course)

I was going to suggest a find command, if you're on unix, but then I
discovered I didn't understand python syntax:

$ echo `python -c 'for d in [1,2]: print d'`

works, while

$ echo `python -c 'import sys; for d in [1,2]: print d'`

doesn't -- it's a SyntaxError.

Why?


John


More information about the Python-list mailing list

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