Python 2.7 and 3.9
Ethan Furman
ethan at stoneleaf.us
Tue Feb 16 15:19:23 EST 2021
On 2/16/21 12:09 PM, Kevin M. Wilson via Python-list wrote:
> My employer has hundreds of scripts in 2.7, but I'm writing new scripts in 3.9! I'm running into 'invalid syntax' errors.I have to maintain the 'Legacy' stuff, and I need to mod the path et al., to execute 3.7 w/o doing damage to the 'Legacy' stuff...IDEA' are Welcome!
My first idea/request: have a blank line, a line with only a '--'
(without quotes), and then your signature at the bottom of your posts.
White space aids readability and readability counts. :)
How are those scripts being run? Microsoft Windows or Unix/Linux/BSD?
Typically, the first line of a script will say which version of Python
is needed. For example, on a *nix type system:
#!/usr/bin/python2
--
~Ethan~
More information about the Python-list
mailing list