From 6abd47d9bf9c6ae1d75110f71ab93bc87b961343 2013-01-31 13:50:40 From: Thomas Kluyver Date: 2013-01-31 13:50:40 Subject: [PATCH] Defer import of optparse --- diff --git a/IPython/utils/PyColorize.py b/IPython/utils/PyColorize.py index f7033da..2fd8898 100644 --- a/IPython/utils/PyColorize.py +++ b/IPython/utils/PyColorize.py @@ -41,7 +41,6 @@ _scheme_default = 'Linux' import StringIO import keyword import os -import optparse import sys import token import tokenize @@ -263,6 +262,7 @@ def main(argv=None): Colorize a python file or stdin using ANSI color escapes and print to stdout. If no filename is given, or if filename is -, read standard input.""" + import optparse parser = optparse.OptionParser(usage=usage_msg) newopt = parser.add_option newopt('-s','--scheme',metavar='NAME',dest='scheme_name',action='store',