Re: Python preprosessor

2009-06-09 Thread Gabriel Genellina
En Sun, 07 Jun 2009 13:31:07 -0300, Tuomas Vesterinen tuomas.vesteri...@iki.fi escribió: 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:

Re: Python preprosessor

2009-06-08 Thread Tuomas Vesterinen
R. David Murray wrote: Tuomas Vesterinen tuomas.vesteri...@iki.fi 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: test_cpp.py #ifdef

Re: Python preprosessor

2009-06-08 Thread Tuomas Vesterinen
Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tuomas Vesterinen wrote: I am intensively using 2to3.py. So I have 2 codebase: one in py2 and the other in py3. The expectation would be that you only maintain the py2 code and automatically generate the py3 code on demand

Python preprosessor

2009-06-07 Thread Tuomas Vesterinen
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: test_cpp.py #ifdef python2 print u'foo', u'bar' #endif #ifdef python3 print('foo', 'bar')

Re: Python preprosessor

2009-06-07 Thread Peter Otten
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?

Re: Python preprosessor

2009-06-07 Thread Tuomas Vesterinen
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?

Re: Python preprosessor

2009-06-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tuomas Vesterinen wrote: I am intensively using 2to3.py. So I have 2 codebase: one in py2 and the other in py3. The expectation would be that you only maintain the py2 code and automatically generate the py3 code on demand using 2to3. It is