On Apr 16, 2013, at 21:02, Jim Mooney <cybervigila...@gmail.com> wrote:
> 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 ;') Much ink has been spilled on just such a translation, but you may as well start with the 2to3 script and see if that suffices for your needs: http://docs.python.org/2/library/2to3.html Michael > > Jim > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor