Low level questions

28 views
Skip to first unread message

matt

unread,
Jan 4, 2012, 12:52:53 PM1/4/12
to spyd...@googlegroups.com
I have had some trouble getting ipython's qtconsole working inside spyder(I know it is experimental, so I am exploring your code a bit)

I see where you check for the Ipython version .12 and add the IPython frontend option to the menu

 # IPython frontend action

if is_module_installed('IPython', '0.12'):

ipf_action = create_action(self, _("New IPython frontend..."),

icon="ipython.png",

triggered=self.new_ipython_frontend)

self.interact_menu_actions += [None, ipf_action]


Where is the code that does a similar thing for the IPython Kernel, I think it has something to do with the following...but I don't understand why you are checking for the deathrow package.

try:
    # Test if IPython v0.11+ is installed
    from IPython import deathrow #analysis:ignore
    if os.environ.get('QT_API', 'pyqt') == 'pyqt':
        # If PyQt is the selected GUI toolkit (at this stage, only the
        # bootstrap script has eventually set this option),
        # switch to PyQt API #2 by simply importing the IPython qt module
        os.environ['QT_API'] = 'pyqt'
        from IPython.external import qt #analysis:ignore
except ImportError:
    pass

 (also which script calls >>ipython kernel and connects the frontend to it? )

matt

unread,
Jan 4, 2012, 2:08:18 PM1/4/12
to spyder
I now see that

> try:
>     # Test if IPython v0.11+ is installed
>     from IPython import deathrow #analysis:ignore
>     if os.environ.get('QT_API', 'pyqt') == 'pyqt':
>         # If PyQt is the selected GUI toolkit (at this stage, only the
>         # bootstrap script has eventually set this option),
>         # switch to PyQt API #2 by simply importing the IPython qt module
>         os.environ['QT_API'] = 'pyqt'
>         from IPython.external import qt #analysis:ignore
> except ImportError:
>     pass

is just to setup the gui(qt versions and whatnot), nothing to do with
the kernel...so yeah, where is that?

Pierre Raybaut

unread,
Jan 14, 2012, 9:11:53 AM1/14/12
to spyd...@googlegroups.com
Here it is:
http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/externalshell/startup.py#27

-Pierre

2012/1/4 matt <wmatta...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>

matt

unread,
Jan 16, 2012, 11:14:20 AM1/16/12
to spyder
I found the checks I was looking for here

http://code.google.com/p/spyderlib/source/browse/spyderlib/plugins/externalconsole.py

FYI, your code also works with the .13dev version if you change the
checks in this file to look for .13 also.

On Jan 14, 8:11 am, Pierre Raybaut <pierre.rayb...@gmail.com> wrote:
> Here it is:http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/ex...
>
> -Pierre
>
> 2012/1/4 matt <wmattander...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages