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

%page not working #1960

Closed
reckoner opened this issue Jun 14, 2012 · 2 comments · Fixed by #1991
Closed

%page not working #1960

reckoner opened this issue Jun 14, 2012 · 2 comments · Fixed by #1991
Milestone

Comments

@reckoner
Copy link

    %page
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-336-e5a187ccb094> in <module>()
    ----> 1 get_ipython().magic(u'page')

    c:\python26\lib\site-packages\ipython-0.13.dev-py2.6.egg\IPython\core\interactiveshell.pyc in magic(self, arg_s)
       2150         magic_name, _, magic_arg_s = arg_s.partition(' ')
       2151         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
    -> 2152         return self.run_line_magic(magic_name, magic_arg_s)
       2153 
       2154     #-------------------------------------------------------------------------

    c:\python26\lib\site-packages\ipython-0.13.dev-py2.6.egg\IPython\core\interactiveshell.pyc in run_line_magic(self, magic_name, line)
       2076                 args.append(sys._getframe(stack_depth).f_locals)
       2077             with self.builtin_trap:
    -> 2078                 result = fn(*args)
       2079             return result
       2080 

    c:\python26\lib\site-packages\ipython-0.13.dev-py2.6.egg\IPython\core\magics\basic.pyc in page(self, parameter_s)

    c:\python26\lib\site-packages\ipython-0.13.dev-py2.6.egg\IPython\core\magic.pyc in <lambda>(f, *a, **k)
        188     # but it's overkill for just that one bit of state.
        189     def magic_deco(arg):
    --> 190         call = lambda f, *a, **k: f(*a, **k)
        191 
        192         if callable(arg):

    c:\python26\lib\site-packages\ipython-0.13.dev-py2.6.egg\IPython\core\magics\basic.pyc in page(self, parameter_s)
        186 
        187         oname = args and args or '_'
    --> 188         info = self._ofind(oname)
        189         if info['found']:
        190             txt = (raw and str or pformat)( info['obj'] )

    AttributeError: 'BasicMagics' object has no attribute '_ofind'
@takluyver
Copy link
Member

It probably needs to be self.shell._ofind - do you want to make a pull request?

@reckoner
Copy link
Author

Sure. That fixes it. I just tried it.

Thanks!

On Thursday, June 14, 2012 8:32:27 AM, Thomas Kluyver wrote:

It probably needs to be self.shell._ofind - do you want to make a pull request?


Reply to this email directly or view it on GitHub:
#1960 (comment)

@minrk minrk closed this as completed in b4e5658 Jun 20, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
_ofind is a shell attr, not Magics attr

closes ipython#1960
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.

3 participants