Re: How execute at least two python files at once when imported?

2019-11-06 Thread Cameron Simpson
On 06Nov2019 08:16, Spencer Du wrote: Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in another post. Parallel imports can be fine. However, yo

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Cameron Simpson
On 06Nov2019 18:15, Rhodri James wrote: On 06/11/2019 16:02, Spencer Du wrote: Why is importing modules in parallel bad? To put it as simply as I can: 1. The import mechanism is complicated, even the bits that are user-visible. Fiddling with it has a high chance of going wrong. 2. Multi-

Re: Trouble trying to get started with pygame

2019-11-06 Thread René Dudfield
Hi, either use python 3.7, or use the pre-release of pygame 2. py -m pip install pygame==2.0.0.dev6 We're not going to do a python 3.8 release for pygame 1.9.x cheers, On Thu, Nov 7, 2019 at 7:06 AM wrote: > > > Well, "py -m pip install pygame" has come the closest so far to > working. I

Re: Trouble trying to get started with pygame

2019-11-06 Thread originallmoney
> > Well, "py -m pip install pygame" has come the closest so far to working. I > > saw it try to load it and everything, but then, it spat out a series of > > errors, but, the primary one seemed to be this: > > > > WARNING, No "Setup" File Exists, Running "buildconfig/config.py" > > > How abo

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Richard Damon
On 11/6/19 3:37 PM, Michael Torrie wrote: > On 11/6/19 9:16 AM, Spencer Du wrote: >> I just wanted a way to import at least two python files in parallel >> and I wanted to know how this can be done or a reason why its bad as >> stated in another post. > It's not "bad," but it's also not possible.

Re: Trouble trying to get started with pygame

2019-11-06 Thread MRAB
On 2019-11-07 02:26, originallmo...@gmail.com wrote: Can py find Python? Did you try to install pygame with: py -m pip install pygame Well, "py -m pip install pygame" has come the closest so far to working. I saw it try to load it and everything, but then, it spat out a series of errors, but

SSL/TLS in Python using STARTTLS and ssl/ssltelnet and telnetlib

2019-11-06 Thread Veek M
Could someone suggest some introductory reading material that will allow me to use 'telnetlib' with 'ssl' or 'ssltelnet'. (currently using Pan since Knode is dropped on Debian) I'm trying to write something that will download the NNTP headers over TLS. The idea is to 1. telnet to port 119, se

Re: How execute at least two python files at once when imported?

2019-11-06 Thread jfong
Igor Korot於 2019年11月7日星期四 UTC+8上午12時34分35秒寫道: > Hi, > > On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: > > > > Hi > > > > Sorry if I haven't stated my requirements clearly. > > > > I just wanted a way to import at least two python files in parallel and I > > wanted to know how this can be don

Re: Trouble trying to get started with pygame

2019-11-06 Thread originallmoney
> Can py find Python? > > Did you try to install pygame with: > > py -m pip install pygame Well, "py -m pip install pygame" has come the closest so far to working. I saw it try to load it and everything, but then, it spat out a series of errors, but, the primary one seemed to be this: WARNING

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Luciano Ramalho
On Wed, Nov 6, 2019 at 7:54 PM Terry Reedy wrote: > I don't know how much Linux is customized for RP, but last I knew, > Python on RP is MicroPython, not CPython. So I expect OS-related > functions to not necessarily match Linux on a desktop. The default OS on all Raspberry Pi models is Raspbian

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Eryk Sun
On 11/6/19, Chris Angelico wrote: > > Yes, but even if it's not recorded as a timestamp but as an uptime > counter, that counter can be referenced against the current time in > UTC. A DST switch affects the displayed time, but not the internal > definition of "current time" (at least, not on Linux

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread MRAB
On 2019-11-06 22:53, Terry Reedy wrote: On 11/6/2019 3:09 PM, R.Wieser wrote: Dennis, Depends upon the OS... My apologies, its Linux (as on a Raspberry Pi). I don't know how much Linux is customized for RP, but last I knew, Python on RP is MicroPython, not CPython. So I expect OS-related f

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Chris Angelico
On Thu, Nov 7, 2019 at 9:55 AM Terry Reedy wrote: > > On 11/6/2019 3:09 PM, R.Wieser wrote: > > Dennis, > >> Depends upon the OS... > > > > My apologies, its Linux (as on a Raspberry Pi). > > I don't know how much Linux is customized for RP, but last I knew, > Python on RP is MicroPython, not CPyt

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Terry Reedy
On 11/6/2019 3:09 PM, R.Wieser wrote: Dennis, Depends upon the OS... My apologies, its Linux (as on a Raspberry Pi). I don't know how much Linux is customized for RP, but last I knew, Python on RP is MicroPython, not CPython. So I expect OS-related functions to not necessarily match Linux

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Chris Angelico
On Thu, Nov 7, 2019 at 7:31 AM R.Wieser wrote: > > Chris, > > > I don't think boot time would be affected by a DST switch, though. > > It should be recorded in UTC. > > The point is, it /isn't/ a recorded constant (at least not on my machine). > Its just dragged around with the clocks current time

Re: Robot Drift correction help

2019-11-06 Thread Isaiah Foss
Any pointers or help is appreciated, I'm not necessarily asking for answers but any response is appreciated -- https://mail.python.org/mailman/listinfo/python-list

Robot Drift correction help

2019-11-06 Thread Isaiah Foss
We have a robot needed coding, we succeeded however the left wheel has an issue with drift. This was compiled by a professor that requires drift correction. He is overseas and uncontactable the code is as follows. define a procedure to recalibrate rotational speeds when any wheel can be aff

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Chris Angelico
On Thu, Nov 7, 2019 at 7:21 AM R.Wieser wrote: > > Chris > > > That's possibly because you're looking at psutil, which is a third > > party package. Here's its documentation: > > My info came frome here: > https://www.programcreek.com/python/example/53873/psutil.boot_time > > Looking at example 1

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Michael Torrie
On 11/6/19 9:16 AM, Spencer Du wrote: > I just wanted a way to import at least two python files in parallel > and I wanted to know how this can be done or a reason why its bad as > stated in another post. It's not "bad," but it's also not possible. Nor does it make sense. That's why so many people

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread R.Wieser
Chris, > I don't think boot time would be affected by a DST switch, though. > It should be recorded in UTC. The point is, it /isn't/ a recorded constant (at least not on my machine). Its just dragged around with the clocks current time (as in: current time minus uptime). And as such I could e

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread R.Wieser
Chris > That's possibly because you're looking at psutil, which is a third > party package. Here's its documentation: My info came frome here: https://www.programcreek.com/python/example/53873/psutil.boot_time Looking at example 1 it looks the be the same. > But I don't know what its definition

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Chris Angelico
On Thu, Nov 7, 2019 at 7:16 AM R.Wieser wrote: > But granted, on a Raspberry thats a bit of a problem. On the other hand, > just dragging the "last boot time" around by whatever time you now set feels > like fakery. > > Oh man, I can already imagine a CSI plot where someone tries to use as linux

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread R.Wieser
Dennis, > Depends upon the OS... My apologies, its Linux (as on a Raspberry Pi). > You can easily look at the code used by psutil :-) I somehow assumed that those where build-in into the language itself. I'll have to take a peek at what else is available there too. > I read somewhere that the

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Chris Angelico
On Thu, Nov 7, 2019 at 6:11 AM R.Wieser wrote: > > I also tried to google "python BOOT_TIME", but got nowhere (the latter parts > casing was ignored). Hence me posting here. > That's possibly because you're looking at psutil, which is a third party package. Here's its documentation: https://psu

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread R.Wieser
Maxime, > You may want to read PEP 418 which nicely summaries the > different clock available on each platform and their limitations. You mean the CLOCK_REALTIME and CLOCK_MONOTONIC ones ? Yeah, that was what I was looking at :-) > It looks like CLOCK_BOOTTIME is what you want but it is only >

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Bob van der Poel
On Wed, Nov 6, 2019 at 11:15 AM Rhodri James wrote: > On 06/11/2019 16:02, Spencer Du wrote: > > Why is importing modules in parallel bad? > > To put it as simply as I can: > > 1. The import mechanism is complicated, even the bits that are > user-visible. Fiddling with it has a high chance of go

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Rhodri James
On 06/11/2019 16:02, Spencer Du wrote: Why is importing modules in parallel bad? To put it as simply as I can: 1. The import mechanism is complicated, even the bits that are user-visible. Fiddling with it has a high chance of going wrong. 2. Multi-threading is less complicated than import,

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Maxime S
Hello, You may want to read PEP 418 which nicely summaries the different clock available on each platform and their limitations. It looks like CLOCK_BOOTTIME is what you want but it is only available on Linux. Regards, Maxime. Le mer. 6 nov. 2019 à 18:23, R.Wieser a écrit : > Hello all, > >

psutil.boot_time() ... doesn't ?

2019-11-06 Thread R.Wieser
Hello all, I was doing a "lets print some time-related data", and also diaplayed the result of "psutil.boot_time()". Somewhere while doing that I saw that my clock was off, so I used the "date" command to rectify it. The thing is, after that the result of "psutil.boot_time()" was changed - and t

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-06 Thread Oscar Benjamin
On Tue, 5 Nov 2019 at 21:52, Gregory Ewing wrote: > > Peter J. Holzer wrote: > > On 2019-11-04 18:18:39 -0300, Luciano Ramalho wrote: > > > > Or maybe don't catch it here at all but just let it bubble up until it > > hits a level where dealing with it makes sense from the user's point of > > view

RE: How execute at least two python files at once when imported?

2019-11-06 Thread David Raymond
"Why is importing modules in parallel bad?" In general I'd say that "import foo" is supposed to be there because you want the classes, functions, variables etc. in foo to be available in your current program. A module should never run a whole bunch of time consuming stuff when it's imported. If

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Igor Korot
Hi, On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: > > Hi > > Sorry if I haven't stated my requirements clearly. > > I just wanted a way to import at least two python files in parallel and I > wanted to know how this can be done or a reason why its bad as stated in > another post. This is n

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Karsten Hilbert
On Wed, Nov 06, 2019 at 08:16:07AM -0800, Spencer Du wrote: > Sorry if I haven't stated my requirements clearly. > > I just wanted a way to import at least two python files in parallel and I > wanted to know how this can be done or a reason why its bad as stated in > another post. You stated yo

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
Hi Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in another post. Thanks Spencer -- https://mail.python.org/mailman/listinfo/python-list

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Igor Korot
Hi, I think what you are trying is a "chicken-egg" problem. You should clearly state you requirements in order for us to help you. If you have a problem with English I'm sure there is some python-related list/forum in your native language. Just google it. Thank you. On Wed, Nov 6, 2019 at 10:07

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
Why is importing modules in parallel bad? Thanks Spencer -- https://mail.python.org/mailman/listinfo/python-list

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Antoon Pardon
On 5/11/19 19:33, Spencer Du wrote: > Hi > > I want to execute at least two python files at once when imported but I dont > know how to do this. Currently I can only import each file one after another > but what i want is each file to be imported at the same time. Can you help me > write the cod

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Rhodri James
On 06/11/2019 11:42, Rhodri James wrote: On 06/11/2019 09:51, Spencer Du wrote: On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James  wrote: On 05/11/2019 18:33, Spencer Du wrote: I want to execute at least two python files at once when imported but I dont know how to do this. Currently I

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Rhodri James
On 06/11/2019 09:51, Spencer Du wrote: On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote: On 05/11/2019 18:33, Spencer Du wrote: I want to execute at least two python files at once when imported but I dont know how to do this. Currently I can only import each file one after anothe

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote: > On 05/11/2019 18:33, Spencer Du wrote: > > I want to execute at least two python files at once when imported but > > I dont know how to do this. Currently I can only import each file one > > after another but what i want is each fil

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:41:59 UTC+1, Bob Gailer wrote: > On Nov 5, 2019 1:35 PM, "Spencer Du" wrote: > > > > Hi > > > > I want to execute at least two python files at once when imported but I > dont know how to do this. Currently I can only import each file one after > another but what i w

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 21:05:02 UTC+1, Terry Reedy wrote: > On 11/5/2019 1:33 PM, Spencer Du wrote: > > > I want to execute at least two python files at once when imported but I > > dont know how to do this. Currently I can only import each file one after > > another but what i want is eac

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:37:32 UTC+1, Karsten Hilbert wrote: > > I want to execute at least two python files at once when imported but I > > dont know how to do this. > > Currently I can only import each file one after another but what i want is > > each file to be imported > > at the same

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Spencer Du
On Wednesday, 6 November 2019 09:05:42 UTC+1, Christian Gollwitzer wrote: > Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: > > On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du > > declaimed the following: > > > >> Hi > >> > >> I want to execute at least two python files at once when imported

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Christian Gollwitzer
Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du declaimed the following: Hi I want to execute at least two python files at once when imported but I dont know how to do this. Currently I can only import each file one after another but what