I'm playing with pycassaShell (as part of the Cassandra and the Twissandra tutorial). When trying to add two functions inside the shell, and call one from the other I get an error that the Name is not recognized.
This is probably something very simple, but I did not find how to do this.
The pycassaShell looks like:
In [3]: def aaa(): print 5
In [4]: aaa()
5
In [5]: def bbb(): aaa()
In [6]: bbb()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
...
NameError: global name 'aaa' is not defined
This is an issue with the way Pycassa is embedding IPython. This is the same problem @Benjamin White references regarding Django's IPython use. Django fixed the bug by accepting a pull request from an IPython core dev.
I took the liberty to file an issue with Pycassa. Hopefully they'll be able to investigate why a similar fix won't work for them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With