summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/pythontex/pythontex_2to3.py
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-07-14 22:39:29 +0000
committerKarl Berry <karl@freefriends.org>2014-07-14 22:39:29 +0000
commit91e62921c8f6d17fb3a1b701c0b5f99cfeadd408 (patch)
tree8ba1865818a69de5220113ae92b7c54f849fb5f3 /Master/texmf-dist/scripts/pythontex/pythontex_2to3.py
parent5dae7a4d678252feb9eda590f0c6a547a5bcc4d9 (diff)
pythontex (14jul14)
git-svn-id: svn://tug.org/texlive/trunk@34605 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/pythontex/pythontex_2to3.py')
-rwxr-xr-xMaster/texmf-dist/scripts/pythontex/pythontex_2to3.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/pythontex/pythontex_2to3.py b/Master/texmf-dist/scripts/pythontex/pythontex_2to3.py
index baff37b411d..166e6784676 100755
--- a/Master/texmf-dist/scripts/pythontex/pythontex_2to3.py
+++ b/Master/texmf-dist/scripts/pythontex/pythontex_2to3.py
@@ -27,7 +27,7 @@ unified. This approach also allows greater customization of version-specific
code than would be possible if automatic translation with a tool like 2to3
was required.
-Copyright (c) 2012-2013, Geoffrey M. Poore
+Copyright (c) 2012-2014, Geoffrey M. Poore
All rights reserved.
Licensed under the BSD 3-Clause License:
http://www.opensource.org/licenses/BSD-3-Clause
@@ -67,6 +67,8 @@ def from2to3(list_of_code):
elif in_3:
line = re.sub(indent + '#', indent, line, count=1)
fixed.append(line)
+ if fixed[0].startswith('#!/usr/bin/env python2'):
+ fixed[0] = fixed[0].replace('python2', 'python3')
return fixed