[Tutor] regex to promote Py 2 to Py 3?

Jim Mooney cybervigilante at gmail.com
Wed Apr 17 03:02:26 CEST 2013


I already tried an example I copied from something online, in Py 2,
that had a ton of print statements. So I did some fast search and
replace to make them Py 3 with (), since I'm using Py 3. (Except Wing
101 won't do Replace All for some reason I haven't figured out, so
it's a bit tedious)

So for online progs, examples, ebooks, etc, that still have Py 2
examples I can copy, has anyone come up with a nice regex package to
do most of the conversions and produce a mostly Py3 from a Py2? That
might make some things a bit easier. I use Clipmate, which has a regex
option so I could just copy a Py2 script, run the regex, and paste
back a Py3. I could probably work one out but since I don't know Py
yet, that could be problematic ;')

Jim


More information about the Tutor mailing list