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

rootpy browse should change the way it starts ipython #265

Merged
merged 1 commit into from Jun 11, 2013

Conversation

pwaller
Copy link
Member

@pwaller pwaller commented Jun 11, 2013

The problem is that we have separate local and global namespaces, that means:

In [1]: import re

In [2]: locals()["re"]
Out[2]: <module 're' from '/usr/lib64/python2.6/re.pyc'>

In [3]: globals()["re"]
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/user1/pwaller/.local/src/rootpy/scripts/rootpy in <module>()
----> 1 globals()["re"]

KeyError: 're'

In [4]: def test(): return re

In [5]: test()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/user1/pwaller/.local/src/rootpy/scripts/rootpy in <module>()
----> 1 test()

/user1/pwaller/.local/src/rootpy/scripts/rootpy in test()
----> 1 def test(): return re

NameError: global name 're' is not defined

See ipython/ipython#62

ndawe added a commit that referenced this pull request Jun 11, 2013
`rootpy browse` should change the way it starts ipython
@ndawe ndawe merged commit 1dfa417 into rootpy:master Jun 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants