Python preprosessor

Tuomas Vesterinen tuomas.vesterinen at iki.fi
Sun Jun 7 20:09:30 CEST 2009


Peter Otten wrote:
> Tuomas Vesterinen wrote:
> 
>> I am developing a Python application as a Python2.x and Python3.0
>> version. A common code base would make the work easier. So I thought to
>> try a preprosessor. GNU cpp handles this kind of code correct:
> 
>> Any other suggestions?
> 
> http://docs.python.org/dev/3.1/library/2to3.html
> 
> 

I am intensively using 2to3.py. So I have 2 codebase: one in py2 and the 
other in py3. When changing the code I have to do things to 2 separate 
codebase in the repository. There are no patch2to3 or patch3to2, So I 
thought that for ensuring the common functionality of both version it 
would be nice to bring both versions into a common codebase. So I can 
update only one code and automate builds and tests for both versions.

Tuomas Vesterinen



More information about the Python-list mailing list