Show More
@@ -147,7 +147,7 b' license. To use profiling, please install"python2.3-profiler" from non-free.""")' | |||
|
147 | 147 | filter(inst_magic,self.__dict__.keys()) + \ |
|
148 | 148 | filter(inst_bound_magic,self.__class__.__dict__.keys()) |
|
149 | 149 | out = [] |
|
150 | for fn in magics: | |
|
150 | for fn in Set(magics): | |
|
151 | 151 | out.append(fn.replace('magic_','',1)) |
|
152 | 152 | out.sort() |
|
153 | 153 | return out |
@@ -386,7 +386,10 b' license. To use profiling, please install"python2.3-profiler" from non-free.""")' | |||
|
386 | 386 | return None |
|
387 | 387 | |
|
388 | 388 | def magic_magic(self, parameter_s = ''): |
|
389 |
"""Print information about the magic function system. |
|
|
389 | """Print information about the magic function system. | |
|
390 | ||
|
391 | Supported formats: -latex, -brief, -rest | |
|
392 | """ | |
|
390 | 393 | |
|
391 | 394 | mode = '' |
|
392 | 395 | try: |
@@ -394,6 +397,9 b' license. To use profiling, please install"python2.3-profiler" from non-free.""")' | |||
|
394 | 397 | mode = 'latex' |
|
395 | 398 | if parameter_s.split()[0] == '-brief': |
|
396 | 399 | mode = 'brief' |
|
400 | if parameter_s.split()[0] == '-rest': | |
|
401 | mode = 'rest' | |
|
402 | rest_docs = [] | |
|
397 | 403 | except: |
|
398 | 404 | pass |
|
399 | 405 | |
@@ -414,12 +420,21 b' license. To use profiling, please install"python2.3-profiler" from non-free.""")' | |||
|
414 | 420 | else: |
|
415 | 421 | fndoc = 'No documentation' |
|
416 | 422 | else: |
|
417 | fndoc = fn.__doc__ | |
|
423 | fndoc = fn.__doc__.rstrip() | |
|
424 | ||
|
425 | if mode == 'rest': | |
|
426 | rest_docs.append('**%s%s**::\n\n\t%s\n\n' %(self.shell.ESC_MAGIC, | |
|
427 | fname,fndoc)) | |
|
418 | 428 | |
|
429 | else: | |
|
419 | 430 | magic_docs.append('%s%s:\n\t%s\n' %(self.shell.ESC_MAGIC, |
|
420 | 431 | fname,fndoc)) |
|
432 | ||
|
421 | 433 | magic_docs = ''.join(magic_docs) |
|
422 | 434 | |
|
435 | if mode == 'rest': | |
|
436 | return "".join(rest_docs) | |
|
437 | ||
|
423 | 438 | if mode == 'latex': |
|
424 | 439 | print self.format_latex(magic_docs) |
|
425 | 440 | return |
|
1 | NO CONTENT: modified file |
General Comments 0
You need to be logged in to leave comments.
Login now