Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-27 Thread sjmsoft
After chickening out a couple of times over the past few years, about eight months ago we migrated our small code base from 2.7.14 to 3.6.5. Some notes: On 2.7 we spent a couple of years coding with 3.x in mind, using import from __future__ and coding to Python 3 standards wherever possible.

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Tim Chase
On 2019-01-22 19:20, Grant Edwards wrote: > > For anyone who has moved a substantial bunch of Python 2 to Python > > 3, can you please reply with your experience? > > If you used bytes (or raw binary strings) at all (e.g. for doing > things like network or serial protocols) you're in for a lot

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Pete Forman
Robin Becker writes: > On 22/01/2019 19:00, Schachner, Joseph wrote: > .. >> For anyone who has moved a substantial bunch of Python 2 to Python 3, >> can you please reply with your experience? Did you run into any >> issues? Did 2to3 do its job well, or did you have to review its >>

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Robin Becker
On 23/01/2019 21:51, Ian Kelly wrote: On Wed, Jan 23, 2019 at 1:36 PM Stefan Behnel wrote: . All right, but apart from absolute imports, the print function, and true division, what has Python 3.x ever done for us? *ducks* headaches :) -- Robin Becker --

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-24 Thread Robin Becker
On 22/01/2019 19:00, Schachner, Joseph wrote: .. For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? Did you run into any issues? Did 2to3 do its job well, or did you have to review its output to eliminate some working

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Ian Kelly
On Wed, Jan 23, 2019 at 1:36 PM Stefan Behnel wrote: > > Cameron Simpson schrieb am 23.01.19 um 00:21: > > from __future__ import absolute_imports, print_function > > > > gets you a long way. > > ... and: division. All right, but apart from absolute imports, the print function, and true

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Stefan Behnel
Cameron Simpson schrieb am 23.01.19 um 00:21: >  from __future__ import absolute_imports, print_function > > gets you a long way. ... and: division. Stefan -- https://mail.python.org/mailman/listinfo/python-list

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Cameron Simpson
On 23Jan2019 14:15, Grant Edwards wrote: On 2019-01-22, Cameron Simpson wrote: On 22Jan2019 19:20, Grant Edwards wrote: On 2019-01-22, Schachner, Joseph wrote: For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? If you used

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-23 Thread Grant Edwards
On 2019-01-22, Cameron Simpson wrote: > On 22Jan2019 19:20, Grant Edwards wrote: >>On 2019-01-22, Schachner, Joseph wrote: >>> For anyone who has moved a substantial bunch of Python 2 to Python >>> 3, can you please reply with your experience? >> >>If you used bytes (or raw binary strings) at

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Chris Angelico
On Wed, Jan 23, 2019 at 6:10 PM dieter wrote: > > Did 2to3 do its job well > > I have not used "2to3" -- because I doubt, that it can handle > important cases, i.e. when a Python 2 "str" must become a Python 3 bytes > or when a "dict.{keys, values, items}" must be listified. Have you tried? It

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread dieter
"Schachner, Joseph" writes: > ... > For anyone who has moved a substantial bunch of Python 2 to Python 3, can > you please reply with your experience? It can be simple and it can be difficult. I have found "http://python-future.org/compatible_idioms.html; especially useful. > Did you run

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Cameron Simpson
On 22Jan2019 19:20, Grant Edwards wrote: On 2019-01-22, Schachner, Joseph wrote: For anyone who has moved a substantial bunch of Python 2 to Python 3, can you please reply with your experience? If you used bytes (or raw binary strings) at all (e.g. for doing things like network or serial

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Chris Angelico
On Wed, Jan 23, 2019 at 9:43 AM Akkana Peck wrote: > > Grant Edwards writes: > > On 2019-01-22, Schachner, Joseph wrote: > > > > > For anyone who has moved a substantial bunch of Python 2 to Python > > > 3, can you please reply with your experience? > > > > If you used bytes (or raw binary

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Akkana Peck
Grant Edwards writes: > On 2019-01-22, Schachner, Joseph wrote: > > > For anyone who has moved a substantial bunch of Python 2 to Python > > 3, can you please reply with your experience? > > If you used bytes (or raw binary strings) at all (e.g. for doing > things like network or serial

Re: What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Grant Edwards
On 2019-01-22, Schachner, Joseph wrote: > For anyone who has moved a substantial bunch of Python 2 to Python > 3, can you please reply with your experience? If you used bytes (or raw binary strings) at all (e.g. for doing things like network or serial protocols) you're in for a lot of pain.

What is your experience porting Python 2.7.x scripts to Python 3.x?

2019-01-22 Thread Schachner, Joseph
In the company I work for we have a program (free) that runs scripts (that we sell) to test according to particular standards. The program embeds a Python interpreter, and the scripts are Python (which uses functions revealed to Python from within the program). Well, this year must be time