Hi, 2011/7/11 Gour-Gadadhara Dasa <[email protected]>: > On Mon, 11 Jul 2011 09:22:10 +0200 > Thomas Perl <[email protected]> wrote: >> My understanding is that if you use PyQt API 2, it should be >> relatively easy to switch between PyQt and PySide, with only minimal >> changes (PySide only supports PyQt API 2, and tries to be more >> Pythonic where it makes sense). > > Thanks. API 2 is, I believe, recommended to use today... > > Now, considering there is no PySide for py3k (yet), I wonder (since I start > with Python as well), is it possible to write py3k code using 2.7 to ease > future migration to Python-3?
Yes, you can use Python 2.7, but you won't be able to write Py3k code directly. Starting with at least 2.6, there is a "-3" switch to the Python interpreter that you can use to get warnings for things that 2to3 cannot trivially fix. For everything else, the tool 2to3 can be used to automatically convert Python 2 code to Python 3 (for some things like print, this works perfectly, for other things you might have to make sure that you write your code unambiguously - which is where "-3" comes in). The release notes and the documentation in general are usually also helpful to find out what still works in Python 3 or what works differently (and how). HTH :) Thomas _______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
