Re: PYT - The expressions described in the Python language reference yield only boolean values

2022-02-19 Thread Chris Angelico
On Sun, 20 Feb 2022 at 12:00, vanyp wrote: > > *I am trying to learn Python from the grammar given in the Python > language reference and I am surprised.* > The grammar is not the best way to learn the language. It'll show you a lot of unnecessary details. For technical reasons, Python's grammar

PYT - The expressions described in the Python language reference yield only boolean values

2022-02-19 Thread vanyp
*I am trying to learn Python from the grammar given in the Python language reference and I am surprised.* *Lets start here:* *"* *6.3.4. Calls* A call calls a callable object (e.g., a function ) with a possibly empty series of arguments

Re: Long running process - how to speed up?

2022-02-19 Thread Avi Gross via Python-list
Indeed not a clear request. Timing is everything but there are times ... For many purposes, people may read in the entire CSV at a gulp into some data structure like a pandas DataFrame. The file is then closed and any processing done later does whatever you want. Of course you can easily read on

Aw: PYT - How can I subscribe to a topic in the mailing list?

2022-02-19 Thread Karsten Hilbert
> Betreff: PYT - How can I subscribe to a topic in the mailing list? Mailing lists don't subdivide by topic. Your mailer may allow you to filter by Subject:. > And h*ow do I set the topic in my messages?* not applicable The equivalent would be the Subject: header. Karsten -- https://mail.pyt

PYT - How can I subscribe to a topic in the mailing list?

2022-02-19 Thread vanyp
And h*ow do I set the topic in my messages?* -- https://mail.python.org/mailman/listinfo/python-list

Re: Long running process - how to speed up?

2022-02-19 Thread Mats Wichmann
On 2/19/22 05:09, Shaozhong SHI wrote: > Can it be divided into several processes? > Regards, > David The answer is: "maybe". Multiprocessing doesn't happen for free, you have to figure out how to divide the task up, requiring thought and effort. We can't guess to what extent the problem you have

Re: library not initialized (pygame)

2022-02-19 Thread Martin Di Paola
Could you share the traceback / error that you are seeing? On Sun, May 02, 2021 at 03:23:21PM -0400, Quentin Bock wrote: Code: #imports and variables for game import pygame from pygame import mixer running = True #initializes pygame pygame.init() #creates the pygame window screen = pygame.dis

Re: Long running process - how to speed up?

2022-02-19 Thread Dennis Lee Bieber
On Sat, 19 Feb 2022 11:28:31 +, Shaozhong SHI declaimed the following: >I have a cvs file of 932956 row and have to have time.sleep in a Python >script. It takes a long time to process. > I'd echo the others... Unless you better explain WHY you have .sleep() (along with how often it

Fwd: Re: Long running process - how to speed up?

2022-02-19 Thread Alan Gauld
On 19/02/2022 11:28, Shaozhong SHI wrote: > I have a cvs file of 932956 row That's not a lot in modern computing terms. > and have to have time.sleep in a Python > script. Why? Is it a requirement by your customer? Your manager? time.sleep() is not usually helpful if you want to do things qui

Re: library not initialized (pygame)

2022-02-19 Thread Cosmo Hope
On Sunday, 2 May 2021 at 21:04:40 UTC+1, Michael Torrie wrote: > On 5/2/21 1:23 PM, Quentin Bock wrote: > > the error apparently comes from the first instructions variable saying > > library not initialized not sure why, its worked before but not now :/ > I don't get that error on my Fedora 32 ma

Re: Converting py files to .exe and .dmg

2022-02-19 Thread Techtask Technologies
On Monday, December 28, 2015 at 4:35:41 PM UTC+1, Brian Simms wrote: > Hi there, > > I have done a lot of looking around online to find out how to convert Python > files to .exe and .dmg files, but I am confused. Could someone provide > pointers/advice as to how I can turn a Python file into a

Re: Long running process - how to speed up?

2022-02-19 Thread Dan Stromberg
On Sat, Feb 19, 2022 at 3:29 AM Shaozhong SHI wrote: > I have a cvs file of 932956 row and have to have time.sleep in a Python > script. It takes a long time to process. > > How can I speed up the processing? Can I do multi-processing? > How are you doing it right now? Are you using the csv m

Re: Error installing requirements

2022-02-19 Thread Marco Sulla
Maybe you compiled Python 2.7 by hand, David? It happened to me when I tried to compile Python without zlib headers installed on my OS. Don't know how it can be done on Windows. -- https://mail.python.org/mailman/listinfo/python-list

Re: Long running process - how to speed up?

2022-02-19 Thread Kirill Ratkin
Hi, How I understand your script starts another script and should wait until second one completes its job. Right? If so you have several options depend on how your first script is written. If your script is async then ... there is good asyncio option proc = await asyncio.create_subprocess_sh

Re: Long running process - how to speed up?

2022-02-19 Thread Shaozhong SHI
Can it be divided into several processes? Regards, David On Saturday, 19 February 2022, Chris Angelico wrote: > On Sat, 19 Feb 2022 at 22:59, Karsten Hilbert > wrote: > > > > > > I have a cvs file of 932956 row and have to have time.sleep in a > Python > > > > script. It takes a long time to p

Re: Long running process - how to speed up?

2022-02-19 Thread Albert-Jan Roskam
On Feb 19, 2022 12:28, Shaozhong SHI wrote: I have a cvs file of 932956 row and have to have time.sleep in a Python script.  It takes a long time to process. How can I speed up the processing?  Can I do multi-processing? Perhaps a dask df:  https://docs.dask.org/

Re: Re: Long running process - how to speed up?

2022-02-19 Thread Chris Angelico
On Sat, 19 Feb 2022 at 22:59, Karsten Hilbert wrote: > > > > I have a cvs file of 932956 row and have to have time.sleep in a Python > > > script. It takes a long time to process. > > > > > > How can I speed up the processing? Can I do multi-processing? > > > > > Remove the time.sleep()? > > He'

Aw: Re: Long running process - how to speed up?

2022-02-19 Thread Karsten Hilbert
> > I have a cvs file of 932956 row and have to have time.sleep in a Python > > script. It takes a long time to process. > > > > How can I speed up the processing? Can I do multi-processing? > > > Remove the time.sleep()? He's attesting to only having "time.sleep" in there... I doubt removing t

Re: Long running process - how to speed up?

2022-02-19 Thread Chris Angelico
On Sat, 19 Feb 2022 at 22:30, Shaozhong SHI wrote: > > I have a cvs file of 932956 row and have to have time.sleep in a Python > script. It takes a long time to process. > > How can I speed up the processing? Can I do multi-processing? > Remove the time.sleep()? ChrisA -- https://mail.python.o

Long running process - how to speed up?

2022-02-19 Thread Shaozhong SHI
I have a cvs file of 932956 row and have to have time.sleep in a Python script. It takes a long time to process. How can I speed up the processing? Can I do multi-processing? Regards, David -- https://mail.python.org/mailman/listinfo/python-list

Re: Error installing requirements

2022-02-19 Thread Albert-Jan Roskam
On Feb 18, 2022 08:23, Saruni David wrote: >> Christian Gohlke's site has a Pillow .whl for python 2.7: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow -- https://mail.python.org/mailman/listinfo/python-list