is it ok to move everything else to another module, and import them
after checking python version?
# wikipedia.py
import sys
if sys.version_info[0] >= 3:
print('python 3.x is not supported')
sys.exit(1)
from wikipedia2 import *
# wikipedia2.py
# (everything in wikipedia.py originally)
On 5/9/09, Francesco Cosoleto <cosoleto(a)gmail.com> wrote:
Nicolas Dumazet ha scritto:
Index: login.py
[...]>
-import re
+import re, sys
+
+if sys.version >= '3':
+ print 'Python 3.x is _not_ supported. Use Python 2.x'
+
[...]
Index: wikipedia.py
[...]
+
+if sys.version >= '3':
+ print 'Python 3.x is _not_ supported. Use Python 2.x'
+
This is a hack, it is very ugly, and it "works" only for chance. Just
update the home page and the CONTENTS file (which should be renamed to
README) or provide a branch for Python 3, looks for me as better solutions.
--
Francesco Cosoleto
"Noi esercitiamo il potere con l'amore, non con le armi" (J. P.
Goebbels, ministro della cultura del governo nazionalsocialista tedesco,
1936)
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l