Re: [Tutor] Identifying V3 examples
Thanks - I’m pretty sure that was how I got to the updated version of that recipe in the first place. I assumed that if you were on a page of V3 examples that the search option would only give you V3 results. It doesn’t. It does seem to restrict the results to Python but ignores the fact that you are on the V3 list. Jon Paris jon.f.pa...@gmail.com On Jul 21, 2015, at 8:16 PM, Alan Gauld alan.ga...@btinternet.com wrote: On 21/07/15 21:19, Jon Paris wrote: The one example I specifically remember was this one http://code.activestate.com/recipes/ For Activestate check the languages tab. You can choose to see only Python 2 or Python 3 recipes. HTH -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Identifying V3 examples
Yup - the “xxx_todo_changeme” was the part that I meant. That might not constitute a “problem” for you but, for someone just starting out, exactly what is needed to correct it was not obvious. I have subsequently resolved the issue. Jon Paris jon.f.pa...@gmail.com On Jul 22, 2015, at 9:52 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 21/07/2015 21:19, Jon Paris wrote: The one example I specifically remember was this one http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ - I happened to be looking for a simple pdf utility and this one was well reviewed. I subsequently have been told that the parts that 2to3 had trouble with were bad practice to begin with - but what do I know. Most of the other examples 2to3 converted (once I discovered it existed and how to use it in my setup) or I was able to decipher myself. I've just run that recipe through 2to3 with no problem, so exactly what do you mean by parts that 2to3 had trouble with? Possibly this? -except IOError, (strerror, errno): -print 'Error: Could not open file to read ---', self._ifile +except IOError as xxx_todo_changeme: +(strerror, errno) = xxx_todo_changeme.args +print('Error: Could not open file to read ---', self._ifile) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Identifying V3 examples
On 21/07/2015 21:19, Jon Paris wrote: The one example I specifically remember was this one http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ - I happened to be looking for a simple pdf utility and this one was well reviewed. I subsequently have been told that the parts that 2to3 had trouble with were bad practice to begin with - but what do I know. Most of the other examples 2to3 converted (once I discovered it existed and how to use it in my setup) or I was able to decipher myself. I've just run that recipe through 2to3 with no problem, so exactly what do you mean by parts that 2to3 had trouble with? Possibly this? -except IOError, (strerror, errno): -print 'Error: Could not open file to read ---', self._ifile +except IOError as xxx_todo_changeme: +(strerror, errno) = xxx_todo_changeme.args +print('Error: Could not open file to read ---', self._ifile) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Identifying V3 examples
On 22/07/2015 15:16, Jon Paris wrote: Yup - the “xxx_todo_changeme” was the part that I meant. That might not constitute a “problem” for you but, for someone just starting out, exactly what is needed to correct it was not obvious. I have subsequently resolved the issue. Jon Paris jon.f.pa...@gmail.com Good to hear, but would you please not top post here, it drives me insane trying to read things that are arse about face, thank you. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor