##// END OF EJS Templates
Remove deprecated "define_magic", that marked to be removed for 5.0
Matthias Bussonnier -
r22401:30b75a2b
parent child
Show More
@@ -426,25 +426,6 class MagicsManager(Configurable):
426 setattr(self.user_magics, magic_name, func)
426 setattr(self.user_magics, magic_name, func)
427 record_magic(self.magics, magic_kind, magic_name, func)
427 record_magic(self.magics, magic_kind, magic_name, func)
428
428
429 def define_magic(self, name, func):
430 """[Deprecated] Expose own function as magic function for IPython.
431
432 Will be removed in IPython 5.0
433
434 Example::
435
436 def foo_impl(self, parameter_s=''):
437 'My very own magic!. (Use docstrings, IPython reads them).'
438 print 'Magic function. Passed parameter is between < >:'
439 print '<%s>' % parameter_s
440 print 'The self object is:', self
441
442 ip.define_magic('foo',foo_impl)
443 """
444 meth = types.MethodType(func, self.user_magics)
445 setattr(self.user_magics, name, meth)
446 record_magic(self.magics, 'line', name, meth)
447
448 def register_alias(self, alias_name, magic_name, magic_kind='line'):
429 def register_alias(self, alias_name, magic_name, magic_kind='line'):
449 """Register an alias to a magic function.
430 """Register an alias to a magic function.
450
431
General Comments 0
You need to be logged in to leave comments. Login now