Skip to content

Commit

Permalink
Remove protected magic list
Browse files Browse the repository at this point in the history
All magics in the list produce a useful error message when called without
any arguments.
  • Loading branch information
bfroehle committed Aug 23, 2012
1 parent 4932093 commit 0776903
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions IPython/frontend/qt/console/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,6 @@ def populate_all_magic_menu(self, listofmagic=None):
self.all_magic_menu.clear()


protected_magic = set(["more","less","load_ext","pycat","loadpy","load","save","psource"])
mlist=ast.literal_eval(listofmagic)
for magic in mlist:
cell = (magic['type'] == 'cell')
Expand All @@ -625,11 +624,7 @@ def populate_all_magic_menu(self, listofmagic=None):
prefix='%'
magic_menu = self._get_magic_menu(mclass)

if name in protected_magic:
suffix = '?'
else :
suffix = ''
pmagic = '%s%s%s'%(prefix,name,suffix)
pmagic = '%s%s'%(prefix,name)

xaction = QtGui.QAction(pmagic,
self,
Expand Down

0 comments on commit 0776903

Please sign in to comment.