[IPython-User] Store problems

Alexandros Attikis enmeeides@hotmail....
Mon Oct 22 04:08:54 CDT 2012


Hi all,

I am a python beginner and I am experiencing problems running the "store" command. 
More specifically, I am trying to store an alias like so:
In [1]: alias eko echo This is a test
In [2]: eko
This is a test
In [3]: store eko
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-2a8246739ce6> in <module>()
----> 1 get_ipython().magic(u'store eko')

/Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2159         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2160         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2161         return self.run_line_magic(magic_name, magic_arg_s)
   2162 
   2163     #-------------------------------------------------------------------------

/Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2085                 args.append(sys._getframe(stack_depth).f_locals)
   2086             with self.builtin_trap:
-> 2087                 result = fn(*args)
   2088             return result
   2089 

/Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/extensions/storemagic.pyc in store(self, parameter_s)

/Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    189     # but it's overkill for just that one bit of state.
    190     def magic_deco(arg):
--> 191         call = lambda f, *a, **k: f(*a, **k)
    192 
    193         if callable(arg):

/Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/extensions/storemagic.pyc in store(self, parameter_s)
    187                 # it might be an alias
    188                 # This needs to be refactored to use the new AliasManager stuff.
--> 189                 if args[0] in self.alias_manager:
    190                     name = args[0]
    191                     nargs, cmd = self.alias_manager.alias_table[ name ]

AttributeError: 'StoreMagics' object has no attribute 'alias_manager'

In [4]: 

Can someone help me out? I am running Python 2.7.2 (default, Jun 20 2012, 16:23:33)  and IPython 0.13 on Mac OS X 10.8.2 (Mountain Lion).

Cheers,
Alexandros


More information about the IPython-User mailing list