cols_justification
I installed Python 3.11 0b3. In the IDLE, cols_justification works fine in my program "sg.Table". When installing Pycharm 2022.2 later, "cols_just.." does not work. Error message: File "H:\pf\PyFibu\FIBU.py", line 85, in beg_buchen [sg.table(values=list field, headings=header, ^^ TypeError: Table.__init__() received an unexpected keyword argument 'cols_justification'. Please, I need help - thanks! -- https://mail.python.org/mailman/listinfo/python-list
Re: cols_justification
On 2022-08-10 09:02, Helmut Weingrill wrote: I installed Python 3.11 0b3. In the IDLE, cols_justification works fine in my program "sg.Table". When installing Pycharm 2022.2 later, "cols_just.." does not work. Error message: File "H:\pf\PyFibu\FIBU.py", line 85, in beg_buchen [sg.table(values=list field, headings=header, ^^ TypeError: Table.__init__() received an unexpected keyword argument 'cols_justification'. Please, I need help - thanks! It would've helped if you had mentioned PySimpleGUI. It took me some time to figure out what you were talking about! Anyway, it looks like you're using an older version of it when using PyCharm (or PyCharm is finding an older version of it or Python). -- https://mail.python.org/mailman/listinfo/python-list
RE: Parallel(?) programming with python
Schachner, Joseph (US) wrote at 2022-8-9 17:04 +: >Why would this application *require* parallel programming? This could be >done in one, single thread program. Call time to get time and save it as >start_time. Keep a count of the number of 6 hour intervals, initialize it to >0. You could also use the `sched` module from Python's library. -- https://mail.python.org/mailman/listinfo/python-list
Re: Parallel(?) programming with python
On Wed, 10 Aug 2022 19:33:04 +0200, "Dieter Maurer" declaimed the following: >Schachner, Joseph (US) wrote at 2022-8-9 17:04 +: >>Why would this application *require* parallel programming? This could be >>done in one, single thread program. Call time to get time and save it as >>start_time. Keep a count of the number of 6 hour intervals, initialize it >>to 0. > >You could also use the `sched` module from Python's library. Time to really read the library reference manual again... Though if I read this correctly, a long running action /will/ delay others -- which could mean the (FFT) process could block collecting new 1-second readings while it is active. It also is "one-shot" on the scheduled actions, meaning those actions still have to reschedule themselves for the next time period. -- Wulfraed Dennis Lee Bieber AF6VN wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Parallel(?) programming with python
On 2022-08-09 at 17:04:51 +, "Schachner, Joseph (US)" wrote: > Why would this application *require* parallel programming? This could > be done in one, single thread program. Call time to get time and save > it as start_time. Keep a count of the number of 6 hour intervals, > initialize it to 0. In theory, you are correct. In practice, [stuff] happens. What if your program crashes? Or the computer crashes? Or there's a Python update? Or an OS update? Where does all that pending data go, and how will you recover it after you've addressed whatever happened? ¹ OTOH, once you start writing the pending data to a file, then it's an extremely simple leap to multiple programs (rather than multiple threads) for all kinds of good reasons. ¹ FWIW, I used to develop highly available systems, such as telephone switches, which allow [stuff] to happen, and yet continue to function. It's pretty cool to yank a board (yes, physically remove it, without warning) from the system without [apparently] disrupting anything. Such systems also allow for hardware, OS, and application upgrades, too (IIRC, we were allowed a handful of seconds of downtime per year to meet our availability requirements). That said, designing and building such a system for the sakes of simplicity and convenience of the application we're talking about here would make a pretty good definition of "overkill." -- https://mail.python.org/mailman/listinfo/python-list
RE: Parallel(?) programming with python
There are many possible discussions we can have here and some are not really about whether and how to use Python. The user asked how to do what is a fairly standard task for some people and arguably is not necessarily best done using a single application running things in parallel. So, yes, if you have full access to your machine and can schedule tasks, then some obvious answers come to mind where one process listens and receives data and stores it, and another process periodically wakes up and grabs recent data and processes it and perhaps still another process comes up even less often and does some re-arrangement of old data. And, yes, for such large volumes of data it may be a poor design to hold all the data in memory for many hours or even days and various ways of using a database or files/folders with a naming structure are a good idea. But the original question remains, in my opinion, a not horrible one. All kinds of applications can be written with sets of tasks run largely in parallel with some form of communication between tasks using shared data structures like queues and perhaps locks and with a requirement that any tasks that take nontrivial time need a way to buffer any communications to not block others. Also, for people who want to start ONE process and let it run, and perhaps may not be able to easily schedule other processes on a system level, it can be advantageous to know how to set up something along those lines within a single python session. Of course, for efficiency reasons, any I/O to files slows things down but what is described here as the situation seems to be somewhat easier and safer to do in so many other ways. I think a main point is that there are good ways to avoid the data from being acted on by two parties that share memory. One is NOT to share memory for this purpose. Another might be to have the 6-hour process use a lock to move the data aside or send a message to the receiving process to pause a moment and set the data aside and begin collecting anew while the old is processed and so on. There are many such choices and the parts need not be in the same process or all written in python. But some solutions can be generalized easier than others. For example, can there become a need to collect data from multiple sources, perhaps using multiple listeners? -Original Message- From: Python-list On Behalf Of Dieter Maurer Sent: Wednesday, August 10, 2022 1:33 PM To: Schachner, Joseph (US) Cc: Andreas Croci ; python-list@python.org Subject: RE: Parallel(?) programming with python Schachner, Joseph (US) wrote at 2022-8-9 17:04 +: >Why would this application *require* parallel programming? This could be done in one, single thread program. Call time to get time and save it as start_time. Keep a count of the number of 6 hour intervals, initialize it to 0. You could also use the `sched` module from Python's library. -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Parallel(?) programming with python
On 2022-08-10 14:19:37 -0400, Dennis Lee Bieber wrote: > On Wed, 10 Aug 2022 19:33:04 +0200, "Dieter Maurer" > declaimed the following: > >Schachner, Joseph (US) wrote at 2022-8-9 17:04 +: > >>Why would this application *require* parallel programming? This > >>could be done in one, single thread program. Call time to get time > >>and save it as start_time. Keep a count of the number of 6 hour > >>intervals, initialize it to 0. [...] > Though if I read this correctly, a long running action /will/ > delay others -- which could mean the (FFT) process could block > collecting new 1-second readings while it is active. Certainly, but does it matter? Data is received from some network connection and network connections often involve quite a bit of buffering. If the consumer is blocked for 3 or 4 or maybe even 20 seconds, the producer might not even notice. (This of course depends very much on the details which we know nothing about.) hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list