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
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
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
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
-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
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
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/
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