Re: PyQt5 is not recognized from python 3.8 installation in python 3.10

2021-08-24 Thread Mohsen Owzar
Barry schrieb am Dienstag, 24. August 2021 um 00:25:38 UTC+2:
> > On 23 Aug 2021, at 00:00, Mats Wichmann  wrote:
> > 
> > On 8/22/21 7:04 AM, Mohsen Owzar wrote: 
> >> Hi guys, 
> >> I have on my laptop the python installation 3.8 and newly I installed 
> >> newest version 3.10 as well on my laptop. 
> >> Now I have two IDLEs for both of the installations. 
> >> When I rund some *.py file, having PyQt5 module, on the 3.8 version, it 
> >> works as before without any problems. 
> >> But whenn I run the same file on IDLE with 3.10 installation, it crashes 
> >> and says that PyQt5 is not known. 
> >> I tried to install this package with"pip install pyqt5" or with "py -3 -m 
> >> pip install pyqt5", it brings lots of error messages (long long) as the 
> >> lines below (they are only the beginning of the messages): 
> > 
> > make sure you're getting the right Python by doing 
> > 
> > py -3.10 -m pip install pyqt5 
> > 
> > (the fact you're getting the build error below indicates you _are_ getting 
> > the right one, but it's good to be explicit anyway, just so you're sure). 
> > 
> >> == 
> >> C:\Users\Mohsen>py -3 -m pip install pyqt5 
> >> Collecting pyqt5 
> >> Using cached PyQt5-5.15.4.tar.gz (3.3 MB) 
> >> Installing build dependencies ... done 
> >> Getting requirements to build wheel ... done 
> >> Preparing wheel metadata ... error 
> >> ERROR: Command errored out with exit status 1: 
> >> command: 
> >> 'C:\Users\Mohsen\AppData\Local\Programs\Python\Python310\python.exe' 
> >> 'C:\Users\Mohsen\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py'
> >>  prepare_metadata_for_build_wheel 
> >> 'C:\Users\Mohsen\AppData\Local\Temp\tmprax0esmt' 
> >> cwd: 
> >> C:\Users\Mohsen\AppData\Local\Temp\pip-install-wl_b58e9\pyqt5_1cbd1bab46fa4abaad34b55514561ce6
> >>  
> >> Complete output (33 lines): 
> >> Querying qmake about your Qt installation... 
> >> C:\Qt\4.7.4\bin\qmake.exe -query 
> >> Traceback (most recent call last): 
> >> File 
> >> "C:\Users\Mohsen\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
> >>  line 143, in prepare_metadata_for_build_wheel 
> >> hook = backend.prepare_metadata_for_build_wheel 
> >> AttributeError: module 'sipbuild.api' has no attribute 
> >> 'prepare_metadata_for_build_wheel' 
> > 
> > Your problem here is that there's no released binary wheel for PyQt5, since 
> > Py 3.10 isn't released (there's been some recent chatter about encouraging 
> > projects to make builds for new Python versions available early, e.g. once 
> > a Python version hits release candidate state, but that's just that - 
> > chatter - for now). 
> > 
> > In theory your system should be able to build it, but my experience is that 
> > unless you're an active Python developer on Windows and already have the 
> > right working setup, it pretty much always fails. These are the perils of 
> > trying to use a pre-release... 
> > 
> > That error suggests there's something different going on than usual (which 
> > has to do with the MSVC compiler suite not being set up the way the package 
> > expects): there looks like a version mismatch - it looks like it's finding 
> > qmake for Qt4, not Qt5. Maybe you can make some progress by adjusting some 
> > paths?
> Only trivial C code extensions can be built on windows. 
> And then only if you have the right MSVC tools installed. 
> Most interesting extensions have dependencies only other software. 
> Which means that you need to know how to build all the dependencies as well. 
> 
> For something as complex as PyQt5 you need to be a developer with reasonable 
> experience to build it. 
> 
> Check on PyPI for the available versions and install one of them. 
> 
> Barry
> > 
> > Many people go here to get early-access, albeit unofficial, binary wheels: 
> > 
> > https://www.lfd.uci.edu/~gohlke/pythonlibs 
> > 
> > Unfortunately, PyQt5 is not available from there (as listed in the section 
> > at the very bottom) 
> > 
> >
> > -- 
> > https://mail.python.org/mailman/listinfo/python-list 
> >
Thanks a lot for your answers.
That's true. I had a project which used Qt4.7, and I have still on my laptop.
I have not so big knowledge about compiling and building stuff, so I have to 
get rid of 3.10 version.
OK, then I try to remove Python 3.10 and to install 3.9.6.
Best regards
Mohsen
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Decoding of EmailMessage text

2021-08-24 Thread Loris Bennett
jak  writes:

> Il 23/08/2021 13:12, Loris Bennett ha scritto:
>> Jon Ribbens  writes:
>>
>>> On 2021-08-23, Loris Bennett  wrote:
 If instead of

mail.set_content(body)

 I do

mail.set_content(body, cte="quoted-printable")
>>>
>>> Try print(mail.get_content()) rather than print(mail.as_string())
>>
>> That did the trick - thanks!
>>
>> Cheers,
>>
>> Loris
>>
>
>
> If you also want to know about the text, then that is probably utf8
> encoded and converted to base64:
>
> from base64 import b64decode
>
> coded=(b'RGVhciBEci4gQmVubmV0dCwKCkJsb3JwISBCbGVlcCEKCgotLQpNYWlsYm90IEl'
>b'uYy4KMDEwMTAxIEJvdCBCb3VsZXZhcmQKQm90aGFtIENpdHkKQsO2dGxhbmQK')
>
> uncoded = b64decode(coded).decode('utf8')
> print(uncoded)
>
> output:
>
> Dear Dr. Bennett,
>
> Blorp! Bleep!
>
>
> --
> Mailbot Inc.
> 010101 Bot Boulevard
> Botham City
> Bötland

Thanks!  I don't need that right now, but it's good to know which
decoding hoop I would have to jump through, if I did.

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


[OSys PL Labs] 3 UI/UX Research Engineer Positions for Progr. Languages and Tools (Remote)

2021-08-24 Thread Nick Papoylias
Dear colleagues,

The newly founded PL (Programming Languages) research Group at OutSystems

has a goal of exploring the UI/UX frontier of Programming Tools.

We are looking for 3 UI/UX Research Engineers for Programming Languages &
Tools (Remote) to join our group. Please forward to anyone you think might
be interested by our call:

Europe/EMEA:
https://www.outsystems.com/careers/job-detail/8a7887a87acffd16017b1cedb4930469/

US/Americas:
https://www.outsystems.com/careers/job-detail/8a7885a87b55f750017b7479ec9f365b/

India/APAC:
https://www.outsystems.com/careers/job-detail/8a7883a97ad004d8017b1011897d76de/

Best Regards,

Dr. Papoulias (@npapoylias )
*Director of Research **@OutSystems* 

==

*If you consider yourself (or aspire to be) a UI/UX expert with programming
experience that wants to: “Boldly go where no programmer has gone before”
don’t let any impostor syndrome stop you, apply to join us! What we are
looking for in our research group -- first and foremost -- is explorers.
Take a look at this short video to quickly learn more about
OutSystems: https://youtu.be/0gx3hMMDOZI. *



*Responsibilities:*


** Your base responsibility will be the development of research prototypes
from an engineering perspective. Nevertheless, the research nature of these
prototypes will almost always require you to either learn a new language, a
new system or way of working. You will always be given time and guidance
(bibliography, books and an engineering starting point) to do so. The
director of the group will always be there to guide you with all aspects of
your work.*


** Once this base responsibility is fulfilled your UI/UX experience and
expertise will help us go even further. What can we add to a good prototype
to bring aesthetics and usability to the mix ? What will make us smile
every time we use it ?*


** When you become comfortable with the above responsibilities you can
start proposing your own experiments to the team and guide our newest
members through the whole R&D process.*
** Finally, according to the group’s needs you will be tasked to present
our work to colleagues, internally or externally (to the wider industrial
and academic community), participate in conferences, publications and in
the general dissemination of our work.*
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: on perhaps unloading modules?

2021-08-24 Thread Peter J. Holzer
On 2021-08-22 16:28:12 -0300, Hope Rouselle wrote:
> I have a certain distaste for syntax too.  For instance, I would much
> rather write and read ``first(ls)'' than ``ls[0]''.

Would you also prefer `twothousandthreehundredandtwentythird(ls)` over
`ls[2322]`?

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | [email protected] |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[Off-Topic?] I love Python

2021-08-24 Thread Emir Geçir
   I really love Python, it has an easy to understand and write syntax, it
   can get EVERY task done when used right and has a great community on
   platforms like Reddit, Discord etc.
   **
   All the work every contributor, especially Guido and Mark Hammond has put
   into this language over years that is even longer than my lifespan is
   incredible, the endless list of modules by contributors, all the open
   source even non-open source projects done with Python is incredible.
   **
   And since Python 3.10 exists Python 4 seems very far away but only time
   may show what will happen. Maybe even a bigger community, even children
   and elderly being able to make stuff.
-- 
https://mail.python.org/mailman/listinfo/python-list