Re: Python preprosessor

2009-06-08 Thread Gabriel Genellina
En Sun, 07 Jun 2009 13:31:07 -0300, Tuomas Vesterinen 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: #ifdef python2 print u

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 using

Re: Python preprosessor

2009-06-08 Thread Tuomas Vesterinen
R. David Murray 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: #ifdef python2 print u'foo', u'bar' #endif

Python preprosessor

2009-06-07 Thread R. David Murray
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: > > > #ifdef python2 > print u'foo', u'bar' > #endif > #ifdef

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 possi

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? http://docs.python.org

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? http://docs.python.org/dev/3.1/library/

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: #ifdef python2 print u'foo', u'bar' #endif #ifdef python3 print('foo', 'bar') #endif result