Skip to content

Commit 6abd47d

Browse files
committed
Defer import of optparse
1 parent 7230118 commit 6abd47d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

IPython/utils/PyColorize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import StringIO
4242
import keyword
4343
import os
44-
import optparse
4544
import sys
4645
import token
4746
import tokenize
@@ -263,6 +262,7 @@ def main(argv=None):
263262
Colorize a python file or stdin using ANSI color escapes and print to stdout.
264263
If no filename is given, or if filename is -, read standard input."""
265264

265+
import optparse
266266
parser = optparse.OptionParser(usage=usage_msg)
267267
newopt = parser.add_option
268268
newopt('-s','--scheme',metavar='NAME',dest='scheme_name',action='store',

0 commit comments

Comments
 (0)