diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 07:42:08 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 07:42:08 -0700 |
commit | 49a8902a673d6fb2ba9ca446fc652aa9d2e55e1b (patch) | |
tree | e71c0d8f6123307860a58796ed840bf32526b3fe /doc/numpybook/runcode.py | |
parent | 3c8fc14665548c71a9cd144b2e16d9309a92e255 (diff) | |
parent | 4394515cd5632a7f110993ff75033d407d10861d (diff) | |
download | numpy-49a8902a673d6fb2ba9ca446fc652aa9d2e55e1b.tar.gz |
Merge pull request #3191 from charris/2to3-apply-imports-fixer
2to3: Apply `imports` fixer.
Diffstat (limited to 'doc/numpybook/runcode.py')
-rw-r--r-- | doc/numpybook/runcode.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/numpybook/runcode.py b/doc/numpybook/runcode.py index 66c74cd74..858168e11 100644 --- a/doc/numpybook/runcode.py +++ b/doc/numpybook/runcode.py @@ -18,7 +18,7 @@ from __future__ import division, absolute_import import sys import optparse -import cStringIO +import io import re import os @@ -27,7 +27,7 @@ newre = re.compile(r"\\begin_inset Note.*PYNEW\s+\\end_inset", re.DOTALL) def getoutput(tstr, dic): print "\n\nRunning..." print tstr, - tempstr = cStringIO.StringIO() + tempstr = io.StringIO() sys.stdout = tempstr code = compile(tstr, '<input>', 'exec') try: @@ -82,7 +82,7 @@ def getnewcodestr(substr, dic): def runpycode(lyxstr, name='MyCode'): schobj = re.compile(r"\\layout %s\s+>>> " % name) - outstr = cStringIO.StringIO() + outstr = io.StringIO() num = 0 indx = [] for it in schobj.finditer(lyxstr): |