diff options
author | Karl Berry <karl@freefriends.org> | 2014-07-14 22:39:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-07-14 22:39:29 +0000 |
commit | 91e62921c8f6d17fb3a1b701c0b5f99cfeadd408 (patch) | |
tree | 8ba1865818a69de5220113ae92b7c54f849fb5f3 /Master/texmf-dist/scripts/pythontex/pythontex_2to3.py | |
parent | 5dae7a4d678252feb9eda590f0c6a547a5bcc4d9 (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-x | Master/texmf-dist/scripts/pythontex/pythontex_2to3.py | 4 |
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 |