From 1cec181e2b98dac9b9ee49588518eb50fd7f7a06 2011-10-29 04:07:51 From: MinRK Date: 2011-10-29 04:07:51 Subject: [PATCH] compile sub expr in %config for 2.6 compatibility --- diff --git a/IPython/core/magic.py b/IPython/core/magic.py index 9f891b7..bf65e55 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -3704,7 +3704,7 @@ Defaulting color scheme to 'NoColor'""" cls = c.__class__ help = cls.class_get_help(c) # strip leading '--' from cl-args: - help = re.sub(r'^\-\-', '', help, flags=re.MULTILINE) + help = re.sub(re.compile(r'^--', re.MULTILINE), '', help) print help return elif '=' not in line: