On 2013-04-11, Pavel Sanda wrote:
> Enrico Forestieri wrote:
>> On Sat, Apr 06, 2013 at 10:10:48AM -0700, Pavel Sanda wrote:

As a long-term project, I suggest making the Python scripts run with both,
Python 2.x and 3.x (with x some decent choice of not-too-old versions).

For simple modules, this could be achieved by some compatibility definitions
and avoiding incompatible syntax.

For larger modules/packages, I suggest providing:

* two versions of the module/package, where the Py3x version is generated
  from the Py2x version with the 2to3 script that comes with distutils.
  
* a front end script that detects the Python version and imports the
  corresponding module.
  
I have some experience in this field from Docutils development, so I may be
able to help implementing.

Günter  

Reply via email to