Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Console: Additions to the initial namespace #9789

Closed
JulienCochuyt opened this issue Jun 22, 2019 · 0 comments · Fixed by #9790
Closed

Python Console: Additions to the initial namespace #9789

JulienCochuyt opened this issue Jun 22, 2019 · 0 comments · Fixed by #9790
Milestone

Comments

@JulienCochuyt
Copy link
Collaborator

@JulienCochuyt JulienCochuyt commented Jun 22, 2019

Is your feature request related to a problem? Please describe.

The initial namespace of the Python Console lacks a few common imports that would allow to take full advantage of the tab-completion capability:

  • appModules
  • controlTypes
  • globalPlugins
  • textInfos

Furthermore, one cannot customize it using a global plugin without first initializing the console.

Describe the solution you'd like

  • Add the above-mentioned imports to the initial namespace.
  • Initialize the namespace in a dedicated method.

Describe alternatives you've considered

Include in the initial namespace all root packages and modules found in sys.modules.
That would cause no new import to be performed while most empowering tab-completion.
Something like: {key: value for key, value in sys.modules.items() if not "." in key}
One might consider this a little too much, though…

Additional context

Upcoming PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants