-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use local namespace #27
Comments
Should be possible, just change https://github.com/james91b/ida_ipython/blob/master/python/ipythonEmbed.py#L64-L65 to app.kernel.user_module = __main__
app.kernel.user_ns = __main__.__dict__ When i first did this, older versions in iPython i used to have strange issues with the auto completion and the completer frame. However, after my simple tests, it seems to work fine in Jupyter. So this is a change we could make. |
Yes, it works 😄 Now I wonder if that indeed a good idea - as the global namespace is extremely messy. |
Yeah, I'm not actually sure what would be more useful. Global namespace can make some thing easier, however it can be messy and if you ever want to affect the global namespace from a notebook you should be able to just import main and do it that way. We could also make it an option to launch the notebook in a new namespace or the global namespace. |
The main (and only) use I see for keeping the global namespace is interaction with plugins. I think it is a worthwhile cause. If we have a way to get the all the data from that scope without dirtying the new one, that would be great. |
Currently, the IPython console and the regular Python console inside IDA have different namespaces.
Is it possible to merge those namespaces?
The text was updated successfully, but these errors were encountered: