[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon
Brett Cannon added the comment: When a replacement for pkgutil.walk_packages() is added to importlib to work appropriately with the import system then this should be doable. See https://bugs.python.org/issue19939 for work to replace pkgutil as appropriate. --

[issue20506] Command to display all available Import Library

2014-09-09 Thread Martin Panter
Martin Panter added the comment: I wrote some code that does something like this for a hacky custom readline completer. See the import_list() method at https://github.com/vadmium/etc/blob/6ac333f/python/pythonstartup.py#L222. It looks like I’m using a combination of “sys.builtin_module_names”

[issue20506] Command to display all available Import Library

2014-02-04 Thread Brett Cannon
Brett Cannon added the comment: The trick would be how to query finders to say what could you find? There is no API for that so either something pragmatic that won't work in the face of e.g. zipfiles would need to be used or a new optional API on finders to list what the tail name of modules

[issue20506] Command to display all available Import Library

2014-02-03 Thread Arup Chakravarty
New submission from Arup Chakravarty: Have a built-in mechanism to display all available import libraries within the interpreter. Like what is available through the built-in dir function. -- components: Library (Lib) messages: 210171 nosy: arupchakrav priority: normal severity: normal

[issue20506] Command to display all available Import Library

2014-02-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: import sys sys.modules.keys() ['google', 'copy_reg', 'sre_compile', '_sre', 'encodings', 'site', '__builtin__', 'sysconfig', '__main__', 'encodings.encodings', 'abc', 'posixpath', '_weakrefset', 'errno', 'encodings.codecs', 'sre_constants', 're',

[issue20506] Command to display all available Import Library

2014-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is not what the OP asked, AFAICT. sys.modules is just the set of currently imported modules, not all potentially importable modules. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue20506] Command to display all available Import Library

2014-02-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: I guess I have no idea what the OP is asking for then. dir() certainly only gives immediately available builtins. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20506

[issue20506] Command to display all available Import Library

2014-02-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the OP's original idea (something like a dir_modules() function that lists out all possible imports). I think something like this must already be present in some of the Python front-ends such as ipython and bpython. That is how they support