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

fix Magic menu in qtconsole, split in groups #1782

Merged
merged 1 commit into from Jun 6, 2012

Conversation

Projects
None yet
3 participants
@Carreau
Member

Carreau commented May 29, 2012

partially fixes #1774

alternative to #1776, that also reorganize magic in several menu.
Menu name is decided by inserting space in the CamelCasse name of the class of the magic.

screencap

Moreover, if there is a way to know if the magic have to take argument or not (%logstate vs %timeit),
I could tweak the menu to either execute, or to paste the magic at the beginning of the curent line.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver May 29, 2012

Member

The ... on 'All magics' looks odd, because it has a submenu. Normally, ... implies that clicking on it will bring up some sort of dialog.

Member

takluyver commented May 29, 2012

The ... on 'All magics' looks odd, because it has a submenu. Normally, ... implies that clicking on it will bring up some sort of dialog.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau May 29, 2012

Member

... removed .

Member

Carreau commented May 29, 2012

... removed .

@minrk

View changes

Show outdated Hide outdated IPython/core/magic.py
magic_list = []
for m_type, m_list in self.magics.iteritems() :
for m_name, mgc in m_list.iteritems():
magic_list.append({'name':m_name, 'type':m_type, 'class':mgc.im_class.__name__})

This comment has been minimized.

@minrk

minrk Jun 2, 2012

Member

mgc may be just a function here, in which case this will raise AttributeError on im_class. To see this, simply run this block in the qtconsole on master, where %guiref is such a magic.

@minrk

minrk Jun 2, 2012

Member

mgc may be just a function here, in which case this will raise AttributeError on im_class. To see this, simply run this block in the qtconsole on master, where %guiref is such a magic.

fix magic menu in qtconsole
Rearrange magics in menu, organize as submenu based on class of magic
@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 2, 2012

Member

Thanks, fixed, rebased and squashed to have cleaner commits.

Member

Carreau commented Jun 2, 2012

Thanks, fixed, rebased and squashed to have cleaner commits.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 4, 2012

Member

Does anybody ave something agains me merging it ?
Otherwise i'll do so in 24h.

Member

Carreau commented Jun 4, 2012

Does anybody ave something agains me merging it ?
Otherwise i'll do so in 24h.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 6, 2012

Member

merging then...

Member

Carreau commented Jun 6, 2012

merging then...

Carreau added a commit that referenced this pull request Jun 6, 2012

Merge pull request #1782 from Carreau/magiclistinfo
fix Magic menu in qtconsole, split in groups

@Carreau Carreau merged commit 8b00a30 into ipython:master Jun 6, 2012

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #1782 from Carreau/magiclistinfo
fix Magic menu in qtconsole, split in groups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment