Re: Use à Python 2 module with Python 3

Michael Parchet mparchet at sunrise.ch
Wed Mar 11 05:28:28 EDT 2015


Hello,

The pyside project is ded.
Dose pyqt4 support Python 3 ?
Thanks for your answer
Best regards
mparchet 



> Le 10 mars 2015 à 01:20, Michael Torrie <torriem at gmail.com> a écrit :
> 
>> On 03/09/2015 05:47 PM, Steven D'Aprano wrote:
>> Michael Parchet wrote:
>> 
>>> Hello,
>>> 
>>> For a new project, a person recommande me to use Python 3
>>> 
>>> can I use Python 3 with a Python 2 y module ex : pyQt 4 ?
>> 
>> Maybe.
>> 
>> If the module is really only Python 2, then no. If it is pure-Python, with
>> no C extensions, then you might be able to fork it and update it to work
>> with Python 3. The 2to3 tool may help with that.
>> 
>> If a module's documentation says it works with Python 2, but doesn't mention
>> Python 3 at all, it *might* work with Python 3. The author or maintainer of
>> the project simply hasn't gotten around to fixing the documentation. So it
>> may be worth just trying it and seeing for yourself.
>> 
>> For PyQt specifically, googling suggests that PyQt does work with Python 3,
>> but the documentation is out of date and you may have difficulty installing
>> it:
>> 
>> https://www.google.com.au/search?q=pyqt+python3
> 
> PySide does support Python 3.  Last time I installed it, I think it did
> it with pip.  It will require a working C++ compiler to install it.
> Both PyQt and PySide are not pure python. They have bridging code that
> must be compiled.
> -- 
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list