How do I modify a bar graph?

2021-07-29 Thread Steve
The following code is from the site: https://matplotlib.org/stable/gallery/index.html bar graph. Sometimes I want to project a graph that contains almost 100 elements. The program shows everything crammed into a default size graph. Can I modify the size of the graph and make it longer? Also,

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-18 Thread Terry Reedy
On 6/17/2021 5:02 PM, Michael Boom wrote: The below issue is pretty serious and it is preventing me from using a system I wrote on a larger scale. How do I get this bug fixed? Thanks. https://bugs.python.org/issue43329 Reduce your code to the minimum needed to exhibit the problem. Then run

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-18 Thread Oscar Benjamin
On Fri, 18 Jun 2021 at 15:27, Michael Boom wrote: > The below issue is pretty serious and it is preventing me from using a > system I wrote on a larger scale. How do I get this bug fixed? Thanks. > https://bugs.python.org/issue43329 On Fri, 18 Jun 2021 at 06:07, Alexander Neils

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Barry
cessing\managers.py", > line 532, in connect >conn = Client(self._address, authkey=self._authkey) > File > "C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py", > line 492, in Client >c = SocketClient(addres

Re: How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Alexander Neilson
Client c = SocketClient(address) File "C:\Users\Alexander\AppData\Local\Programs\Python\Python37\lib\multiprocessing\connection.py", line 619, in SocketClient s.connect(address) KeyboardInterrupt Regards Alexander Alexander Neilson Neilson Productions Limited alexan...@

How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Michael Boom
The below issue is pretty serious and it is preventing me from using a system I wrote on a larger scale. How do I get this bug fixed? Thanks. https://bugs.python.org/issue43329 -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I read .csv files

2021-03-16 Thread Alan Gauld via Python-list
On 16/03/2021 16:15, The Cool Life wrote: > Try importing the CSV module. That might help! And for the removal of doubt it is spelled csv 9lower case) And it looks like you want to read about the DictReader class within it. The csv module docs include several examples. -- Alan G Author of the L

Re: How do I read .csv files

2021-03-16 Thread The Cool Life
Try importing the CSV module. That might help! > On Mar 16, 2021, at 6:27 AM, Gys wrote: > > On 3/12/21 11:28 AM, Johann Klammer wrote: >> Specifically ones with quoted strings. I'll have whitespace in >> there and possibly escaped quotechars. >> maybe newlines too. >> Which means that pyparsi

Re: How do I read .csv files

2021-03-16 Thread Benjamin Schollnick
The best answer is to use the CSV library, but there are wrappers around it. For example, I use a wrapper of my own creation (csv_common.py) @ https://github.com/bschollnick/bas_Utilities . The main benefit is that I can create variant CSV’s by just

Re: How do I read .csv files

2021-03-16 Thread Gys
On 3/12/21 11:28 AM, Johann Klammer wrote: Specifically ones with quoted strings. I'll have whitespace in there and possibly escaped quotechars. maybe newlines too. Which means that pyparsing commaSeparatedList.parseString(line) won't work. I also like to edit them for visual alignment, so there

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Cameron Simpson
On 16Oct2020 22:07, Albert-Jan Roskam wrote: > I was using datetime.now().isoformat('T', 'seconds') > Not 100% sure, but the strings seemed to be 2hrs off. Could it be that > this Linux server was using the wrong time zone? Maybe. This is why timezones are such a nightmare, and programmes

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread sjeik_appie
On 16 Oct 2020 12:50, Eryk Sun wrote: On 10/16/20, Steve wrote: > -Original Message- > From: Python-list On > Behalf Of Frank Millman > Sent: Friday, October 16, 2020 4:34 AM > To: python-list@python.org > Subject: Re: How do

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Cousin Stanley
Steve wrote: > d2 = datetime.datetime.now() #Time Right now > > Show this: 2020-10-16 02:53 > and not this: 2020-10-16 02:53:48.585865 > > > == > Footnote: > If you double major in psychology and reverse psychology, to they cancel > e

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Eryk Sun
On 10/16/20, Steve wrote: > -Original Message- > From: Python-list On > Behalf Of Frank Millman > Sent: Friday, October 16, 2020 4:34 AM > To: python-list@python.org > Subject: Re: How do I get datetime to stop showing seconds? > > On 2020-10-16 9:4

RE: How do I get datetime to stop showing seconds?

2020-10-16 Thread Steve
Right on target, Many Thanks FootNote: If money does not grow on trees, then why do banks have branches? -Original Message- From: Python-list On Behalf Of Frank Millman Sent: Friday, October 16, 2020 4:34 AM To: python-list@python.org Subject: Re: How do I get datetime to stop

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Marco Sulla
Another way is: '{:%Y-%m-%d %H:%M}'.format(d2) -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I get datetime to stop showing seconds?

2020-10-16 Thread Frank Millman
On 2020-10-16 9:42 AM, Steve wrote: d2 = datetime.datetime.now() #Time Right now Show this: 2020-10-16 02:53 and not this: 2020-10-16 02:53:48.585865 >>> >>> str(d2) '2020-10-16 10:29:38.423371' >>> >>> d2.strftime('%Y-%m-%d %H:%M') '2020-10-16 10:29' >>> Frank Millman -- https://mail.pyt

How do I get datetime to stop showing seconds?

2020-10-16 Thread Steve
d2 = datetime.datetime.now() #Time Right now Show this: 2020-10-16 02:53 and not this: 2020-10-16 02:53:48.585865 == Footnote: If you double major in psychology and reverse psychology, to they cancel each other out? -- -- https://m

RE: How do I pull the updated information from a tkinter form?

2020-08-31 Thread Steve
lines of code. With the loops, probably now is 75. Steve FootNote: If money does not grow on trees, then why do banks have branches? -Original Message- From: Python-list On Behalf Of Peter Otten Sent: Monday, August 31, 2020 3:56 AM To: python-list@python.org Subject: RE: How do I

RE: How do I pull the updated information from a tkinter form?

2020-08-31 Thread Peter Otten
Steve wrote: > OK, I was closer than I thought. > > Two weeks ago, the concept of tkinter and these forms were totally new to > me > as well as, about two days ago, python list was totally new too. I > somehow thought that "window.mainloop()" was supposed to be the last entry > in the function,

RE: How do I pull the updated information from a tkinter form?

2020-08-30 Thread Steve
st 30, 2020 1:55 PM To: python-list@python.org Subject: Re: How do I pull the updated information from a tkinter form? Steve wrote: > #What I cannot seem to do is to pull the adjusted #information from > the form into variables, or a #list/array, so that can be used for the > update to the f

Re: How do I pull the updated information from a tkinter form?

2020-08-30 Thread Peter Otten
Steve wrote: > #What I cannot seem to do is to pull the adjusted > #information from the form into variables, or a > #list/array, so that can be used for the update to the file. The updated data is in the StringVar-s, which, fortunately, you have available in a list ;) So: > def EditDataByForm

How do I pull the updated information from a tkinter form?

2020-08-30 Thread Steve
# With this program, I can read the information from # Specifications.txt file and display it on a form. # The user can then update/modify the fields. This is # all working fine and beeautifully... # # I now need to reverse the process and replace the # adjusted lines of data back into the

RE: How do I left-justify the information in the labels?

2020-08-30 Thread Steve
- From: Python-list On Behalf Of Peter Otten Sent: Sunday, August 30, 2020 10:32 AM To: python-list@python.org Subject: Re: How do I left-justify the information in the labels? Steve wrote: > How do I left-justify the information in the labels? > SVRlabel = ttk.La

Re: How do I left-justify the information in the labels?

2020-08-30 Thread Peter Otten
Steve wrote: > How do I left-justify the information in the labels? > SVRlabel = ttk.Label(window, text = SpecLine + " "*5) > SVRlabel.grid(column = 1, row = x) The text in the labels already is left-justified -- but the labels themselves are centered in

How do I left-justify the information in the labels?

2020-08-30 Thread Steve
for lineItem in range(len(ThisList)): SpecLine, Spec = GetLineByItem(ThisList[y]) OldSpec = Spec NewSpec = " " SVRlabel = ttk.Label(window, text = SpecLine + " "*5) SVRlabel.grid(column = 1, row = x) NewSpec = tk

RE: How do I place a preset into the text box?

2020-08-28 Thread Steve
: Python-list On Behalf Of Cousin Stanley Sent: Friday, August 28, 2020 7:47 AM To: python-list@python.org Subject: Re: How do I place a preset into the text box? Steve wrote: > The following program compiles but does not quite do what I would like > it to do. Line 19 is the preset information

RE: How do I place a preset into the text box?

2020-08-28 Thread Steve
t.." From: Colin McPhail Sent: Friday, August 28, 2020 7:46 AM To: Chris Narkiewicz via Python-list Cc: Steve Subject: Re: How do I place a preset into the text box? Hi Steve, On 28 Aug 2020, at 11:03, Steve mailto:Gronicus@SGA.Ninja> > wrote: The following program

Re: How do I place a preset into the text box?

2020-08-28 Thread Cousin Stanley
Steve wrote: > The following program compiles but does not quite do what I would like it to > do. Line 19 is the preset information but I do not seem to be able to get it > into the form by code. My purpose is to let the user make changes without > having to re-enter the entire code. > You

Re: How do I place a preset into the text box?

2020-08-28 Thread Colin McPhail via Python-list
Hi Steve, > On 28 Aug 2020, at 11:03, Steve wrote: > > > The following program compiles but does not quite do what I would like it to > do. Line 19 is the preset information but I do not seem to be able to get it > into the form by code. My purpose is to let the user make changes without > hav

How do I place a preset into the text box?

2020-08-28 Thread Steve
The following program compiles but does not quite do what I would like it to do. Line 19 is the preset information but I do not seem to be able to get it into the form by code. My purpose is to let the user make changes without having to re-enter the entire code. Suggestions welcome. Steve #==

Re: How do I do this in Python 3 (string.join())?

2020-08-28 Thread Chris Green
Cameron Simpson wrote: [snip] > > >The POP3 processing is solely to collect E-Mail that ends up in the > >'catchall' mailbox on my hosting provider. It empties the POP3 > >catchall mailbox, checks for anything that *might* be for me or other > >family members then just deletes the rest. > > Ver

Re: How do I do this in Python 3 (string.join())?

2020-08-27 Thread Cameron Simpson
On 27Aug2020 14:36, Chris Green wrote: >Cameron Simpson wrote: >> I do ok, though most of my message processing happens to messages >> already landed in my "spool" Maildir by getmail. My setup uses getmail >> to get messages with POP into a single Maildir, and then I process the >> message files

Re: How do I do this in Python 3 (string.join())?

2020-08-27 Thread Chris Green
Cameron Simpson wrote: > On 27Aug2020 09:16, Chris Green wrote: > >Cameron Simpson wrote: > >> But note: joining bytes like strings is uncommon, and may indicate > >> that > >> you should be working in strings to start with. Eg you may want to > >> convert popmsg from bytes to str and do a str.

Re: How do I do this in Python 3 (string.join())?

2020-08-27 Thread Cameron Simpson
On 27Aug2020 09:16, Chris Green wrote: >Cameron Simpson wrote: >> But note: joining bytes like strings is uncommon, and may indicate >> that >> you should be working in strings to start with. Eg you may want to >> convert popmsg from bytes to str and do a str.join anyway. It depends on >> exactl

Re: How do I do this in Python 3 (string.join())?

2020-08-27 Thread Chris Green
Cameron Simpson wrote: > On 26Aug2020 15:09, Chris Green wrote: > >2qdxy4rzwzuui...@potatochowder.com wrote: > >> Join bytes objects with a byte object: > >> > >> b"\n".join(popmsg[1]) > > > >Aaahhh! Thank you (and the other reply). > > But note: joining bytes like strings is uncommon, and

Re: How do I do this in Python 3 (string.join())?

2020-08-26 Thread Cameron Simpson
On 26Aug2020 15:09, Chris Green wrote: >2qdxy4rzwzuui...@potatochowder.com wrote: >> Join bytes objects with a byte object: >> >> b"\n".join(popmsg[1]) > >Aaahhh! Thank you (and the other reply). But note: joining bytes like strings is uncommon, and may indicate that you should be working i

Re: How do I do this in Python 3 (string.join())?

2020-08-26 Thread Chris Green
f > > strings, I get the error:- > > > > TypeError: sequence item 0: expected str instance, bytes found > > > > So how do I do this? I can see clumsy ways by a loop working through > > the list in popmsg[1] but surely there must be a way that's as neat &

Re: How do I do this in Python 3 (string.join())?

2020-08-26 Thread MRAB
popmsg[1] is a list containing the lines of the message However this still doesn't work because popmsg[1] isn't a list of strings, I get the error:- TypeError: sequence item 0: expected str instance, bytes found So how do I do this? I can see clumsy ways by a loop working through th

Re: How do I do this in Python 3 (string.join())?

2020-08-26 Thread D'Arcy Cain
sgstr = s.join(popmsg[1]) # popmsg[1] is a list containing the > lines of the message > > However this still doesn't work because popmsg[1] isn't a list of > strings, I get the error:- > > TypeError: sequence item 0: expected str instance, bytes found >

Re: How do I do this in Python 3 (string.join())?

2020-08-26 Thread 2QdxY4RzWzUUiLuE
quot;\n" > msgstr = s.join(popmsg[1]) # popmsg[1] is a list containing the > lines of the message > > However this still doesn't work because popmsg[1] isn't a list of > strings, I get the error:- > > TypeError: sequence item 0: expected str instance, byt

How do I do this in Python 3 (string.join())?

2020-08-26 Thread Chris Green
essage However this still doesn't work because popmsg[1] isn't a list of strings, I get the error:- TypeError: sequence item 0: expected str instance, bytes found So how do I do this? I can see clumsy ways by a loop working through the list in popmsg[1] but surely there must be a way

How do I close a form without closing the entire program?

2020-08-23 Thread Steve
This program is fully operational with the exception of not being able to close the form when I have completed the data entry. If I have code for a second form, both remain visible. Thoughts appreciated from tkinter import * def

RE: How do I use the data entered in a form?

2020-08-22 Thread Peter Otten
Steve wrote: > I take it that "fetch" is not an inside command or reserved word. The > code is everything what was posted. You don't say where you "found" the code. If you took it from https://www.python-course.eu/tkinter_entry_widgets.php you need to take another look. A fetch() function is

RE: How do I use the data entered in a form?

2020-08-22 Thread Steve
y, to they cacel each other out? -Original Message- From: Python-list On Behalf Of Peter Otten Sent: Saturday, August 22, 2020 2:26 AM To: python-list@python.org Subject: Re: How do I use the data entered in a form? Steve wrote: > def makeform(root, fields): >entries = {} >

Re: How do I use the data entered in a form?

2020-08-21 Thread Peter Otten
Steve wrote: > def makeform(root, fields): >entries = {} >for field in fields: ... >return entries > > if __name__ == '__main__': >root = Tk() >ents = makeform(root, fields) > > SR = (entries['Sensor_Reading'].get()) > print ("SR Outside = " + SR) > > ==

How do I use the data entered in a form?

2020-08-21 Thread Steve
I have a simple form that I copied/modified from a python web site. A lot of it makes sense but I do not see how the form in activated. Is there some call in there that I am just not seeing? How do I use the information entered into the form. Everything works here except for line 30 where

Re: Python3 - How do I import a class from another file

2019-12-16 Thread DL Neil via Python-list
taken when the instance was initialised (in my case a GPIO pin on a Raspberry Pi). I did not even think of garbage collection. In talking so-specifically about del(), etc, have we 'disappeared down a rabbit hole' and not actually addressed this question? Does deleting the insta

Re: Python3 - How do I import a class from another file

2019-12-15 Thread Chris Angelico
On Sun, Dec 15, 2019 at 10:01 PM wrote: > > On Thu, 12 Dec 2019 11:33:25 + > Rhodri James wrote: > > > On 11/12/2019 21:32, mus...@posteo.org wrote: > > > Plain and simple: When the refcount reaches zero. > > > You are assuming that "when" implies "immediately on the occurence." > > I'm not i

Re: Python3 - How do I import a class from another file

2019-12-15 Thread musbur
On Thu, 12 Dec 2019 11:33:25 + Rhodri James wrote: > On 11/12/2019 21:32, mus...@posteo.org wrote: > > Plain and simple: When the refcount reaches zero. > You are assuming that "when" implies "immediately on the occurence." I'm not implying that. It's the dictionary definition of the word

Re: Python3 - How do I import a class from another file

2019-12-13 Thread Greg Ewing
On 14/12/19 5:13 pm, boB Stepp wrote: is it true that CPython itself is free to implement these behaviors differently in its own future versions? Yes. That's why it's not a good idea to rely on them even if you only intend to run your code on CPython. -- Greg -- https://mail.python.org/mailman

Re: Python3 - How do I import a class from another file

2019-12-13 Thread boB Stepp
On Wed, Dec 11, 2019 at 6:51 PM Greg Ewing wrote: > > On 12/12/19 3:50 am, R.Wieser wrote: > > I was rather clear about what my used version of Python was-and-is. I have > > no idea why that was ignored. :-( > > I think we've all been talking at cross purposes for a while. > > What I meant to say

Re: Python3 - How do I import a class from another file

2019-12-13 Thread Antoon Pardon
On 11/12/19 14:42, R.Wieser wrote: > Michael, > >> It's a two-way street. It's hard to teach someone that won't be taught. > Whacking a student over the head because he doesn't understand has never > helped the student*. You were not whacked for not understanding. You were wacked for pretending

Re: Python3 - How do I import a class from another file

2019-12-12 Thread Musbur
Hi Chris, The most important distinction, which that note is emphasizing, is that the "del" statement removes just one reference, and if there are other references, then __del__ will not be called. No argument there, that's how reference counting works, and it's clear from the docs. What is n

Re: Python3 - How do I import a class from another file

2019-12-12 Thread Rhodri James
On 11/12/2019 21:32, mus...@posteo.org wrote: On Tue, 10 Dec 2019 14:56:10 -0500 Dennis Lee Bieber wrote: It is called when the language IMPLEMENTATION decides to call it. That time is not specified in the language description/reference manual. Yes it is: "Note: del x doesn’t directl

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Chris Angelico
On Thu, Dec 12, 2019 at 1:33 PM Daniel Haude wrote: > > Am 10.12.2019 22:29 schrieb Chris Angelico: > > > And once again, you are maintaining your assumptions despite being > > very clearly shown that they are wrong. "del instance" does not > > directly call __del__ any more than "instance = 1" do

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 12/12/19 2:17 pm, Python wrote: I was very impressed back in the day when the with statement and context manager protocol appeared in Python. I've always wondered from what language(s) it was borrowed from It was partly inspired by the RAII pattern often used in C++, but as far as I know, al

Re: Python3 - How do I import a class from another file

2019-12-11 Thread musbur
On Tue, 10 Dec 2019 22:08:48 +0100 "R.Wieser" wrote: > And although you have been fighting me over when the __del__ method is > called, it /is/ called directly as a result of an "del instance" and > the refcount goes zero. There is /no/ delay.(with the only > exception is when a circular ref

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Daniel Haude
Am 10.12.2019 22:29 schrieb Chris Angelico: And once again, you are maintaining your assumptions despite being very clearly shown that they are wrong. "del instance" does not directly call __del__ any more than "instance = 1" does. You HAVE been shown. Much of the confusion in this thread come

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Python
Greg Ewing wrote: ... You deal with it by not relying on __del__ for anything that needs to be done promptly. There are always alternatives: e.g. file objects have a close() method, and the "with" statement was invented to make it easy to do these kinds of things properly. By the way, I was ver

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 12/12/19 3:50 am, R.Wieser wrote: I was rather clear about what my used version of Python was-and-is. I have no idea why that was ignored. :-( I think we've all been talking at cross purposes for a while. What I meant to say originally was that you were relying on an implementation detail

Re: Python3 - How do I import a class from another file

2019-12-11 Thread musbur
On Tue, 10 Dec 2019 14:56:10 -0500 Dennis Lee Bieber wrote: > > It is called when the language IMPLEMENTATION decides to call > it. That time is not specified in the language description/reference > manual. Yes it is: "Note: del x doesn’t directly call x.__del__() — the former decrements

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Roel Schroeven
R.Wieser schreef op 11/12/2019 om 11:43:> MRAB, > >> From the help: > ... >> Do not depend on immediate finalization of objects when they become >> unreachable (so you should always close files explicitly). > > Do you notice there is not a single word about (the delayed action of) the > __del__

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 11.12.2019 11:22 schrieb R.Wieser: I think I will just go out on a limb and just assume that the __del__ method /will/ be called as part of a "del instance" request causing the reference count to reach zero (directly or indirectly), before the next command is executed [...]. That's what

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 11.12.2019 11:01 schrieb Greg Ewing: On 11/12/19 7:47 am, R.Wieser wrote: what happens when the reference becomes zero: is the __del__ method called directly (as I find logical), or is it only called when the garbage collector actually removes the instance from memory (which Chris thinks w

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Chris, > Yes, we know exactly how that's solved, Nice. > but you specifically said you weren't interested in learning. Try taking a few courses of "understanding what you read". That is /not/ what I said. Though it goes in par with your amadant "you're wrong" chanting, even if there is at l

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Arjun pazhanikumar
You could write the name of the class variable you want to import for example class manager On December 10, 2019, at 2:46 AM, Dennis Lee Bieber wrote: On Mon, 9 Dec 2019 20:21:39 +0100, "R.Wieser" declaimed the following: > >And than when the instance is deleted the binding to the class is

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Bev, > You acknowledge that you are new to Python, yet you claimed > to know better than Python experts. You claim you want an answer > and yet you purposefully ignored their response because it didn't match > what you wanted to hear. No, I didn't. I just pointed out that their position simply w

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Chris Angelico
On Thu, Dec 12, 2019 at 1:56 AM R.Wieser wrote: > A question though: I have brought up that a delayed calling of the __del__ > method could/would most likely cause race problems. Do you have any idea > how thats solved in environents like Jython ? Yes, we know exactly how that's solved, but you

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Greg, > In CPython, these are the same thing. As soon as the reference > count becomes zero, the __del__ method is called That is what I assumed (the logical thing to do). > *and* the object is removed from memory. Which sounds reasonable too, especially in regard to the instances variables ne

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Rhodri James
On 11/12/2019 14:17, Musbur wrote: Am 10.12.2019 22:33 schrieb Paul Moore: You do understand that the reference counting garbage collector is an implementation detail of the CPython implementation *only*, don't you? I don't think that's true. Here's a sentonce from near the top of the "gc" m

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 10.12.2019 22:33 schrieb Paul Moore: You do understand that the reference counting garbage collector is an implementation detail of the CPython implementation *only*, don't you? I don't think that's true. Here's a sentonce from near the top of the "gc" module documentation of Python 3: ht

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Antoon, > There is a difference between not understanding why things are as > you are told, and assuming because you don't understand, what you > are told is wrong. The other side is you guys, expecting from me that, even though I appearantly do not understand it, just take whatever has being sa

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Michael, > It's a two-way street. It's hard to teach someone that won't be taught. Whacking a student over the head because he doesn't understand has never helped the student*. So, stop whacking and start /teaching/. Like thinking of examples that could show the student where he goes wrong

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Michael, > You said it by implication. > > quote: "And as I do not think the designers of the language where that > stupid I must therefore reject your claim to what you think happens." I suggest you try reading that again, and imagine it being two centences, the first ending after "stupid" and

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Bev In TX
> On Dec 11, 2019, at 6:09 AM, R.Wieser wrote: > > Paul, > >> You do understand that the reference counting garbage collector is an >> implementation detail of the CPython implementation *only*, don't you? > > No, I don't. But do tell how that matters to me. > >> there can be an indefinite

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
MRAB, > You don't "del" an instance, you "del" a reference, which might be in the > form of a name in a namespace. Remember me, the newbie to the language ? Did you understand what I tried to to say ? Good. Thats al that matters. > When the instance is collected, whenever that happens to be

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Paul, > You do understand that the reference counting garbage collector is an > implementation detail of the CPython implementation *only*, don't you? No, I don't. But do tell how that matters to me. > there can be an indefinite delay between the last reference to > a value being lost and the

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
MRAB, > From the help: ... > Do not depend on immediate finalization of objects when they become > unreachable (so you should always close files explicitly). Do you notice there is not a single word about (the delayed action of) the __del__ method in there ? Why than do you think its talking a

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Dennis, This is the first time I've seen you post FUD. :-(( > It is called when the language IMPLEMENTATION decides to call it. > That time is not specified in the language description/reference manual. I'm rather sure it neither specifies that for any of the other commands. Does that mean that

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 11/12/19 7:47 am, R.Wieser wrote: what happens when the reference becomes zero: is the __del__ method called directly (as I find logical), or is it only called when the garbage collector actually removes the instance from memory (which Chris thinks what happens) ? In CPython, these are the s

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Antoon Pardon
On 10/12/19 22:24, R.Wieser wrote: > Roel, > >> Rudy, unless/until you know the language inside out, you'd better listen >> to Chris and other people here who spend a lot of time and effort in >> helping people like you. > I tried. But what he said made no sense to me, and no matter how hard I

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Python
Michael Torrie wrote: On 12/10/19 2:08 PM, R.Wieser wrote: You might know a thing or two about Python, but you (and a number of others here) positivily stink as teachers, incapable or even unwilling to place themselves in the shoes of a newbie. As it happens, I've heard Chris speak about teach

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Michael Torrie
On 12/10/19 2:08 PM, R.Wieser wrote: > You might know a thing or two about Python, but you (and a number of others > here) positivily stink as teachers, incapable or even unwilling to place > themselves in the shoes of a newbie. As it happens, I've heard Chris speak about teaching Python to studen

Re: Python3 - How do I import a class from another file

2019-12-10 Thread MRAB
On 2019-12-10 21:08, R.Wieser wrote: Chris, Once again, you make positive assertions about things you don't understand. And you have refused to bring any kind of help (explanation!) forward that could have shown me the erring of my ways, as well as refusing to adress my (attempting to explain

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Michael Torrie
On 12/10/19 11:47 AM, R.Wieser wrote: > Who did I call stupid ?I mentioned that the language doing it as Chris > thinks it happens would be stupid, and I gave a reason for that (race > conditions everywhere). But odd: Neither him nor you nor anyone else who > complains about me thinking for

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Paul Moore
On Tue, 10 Dec 2019 at 21:12, R.Wieser wrote: > And although you have been fighting me over when the __del__ method is > called, it /is/ called directly as a result of an "del instance" and the > refcount goes zero. There is /no/ delay.(with the only exception is > when a circular reference e

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Chris Angelico
On Wed, Dec 11, 2019 at 8:26 AM R.Wieser wrote: > > Roel, > > > Rudy, unless/until you know the language inside out, you'd better listen > > to Chris and other people here who spend a lot of time and effort in > > helping people like you. > > I tried. But what he said made no sense to me, and no

Re: Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
Roel, > Rudy, unless/until you know the language inside out, you'd better listen > to Chris and other people here who spend a lot of time and effort in > helping people like you. I tried. But what he said made no sense to me, and no matter how hard I tried I could not get Chris (or others fo

Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
Chris, > Once again, you make positive assertions about things you > don't understand. And you have refused to bring any kind of help (explanation!) forward that could have shown me the erring of my ways, as well as refusing to adress my (attempting to explain) examples. You might know a thing o

Re: Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
Dennis, > In common Python, small integers are cached internally for reuse That is what I imagined could possibly be happening, reading the specific "the integer 5" formulation in the question ("reading between the lines" and all that). And thanks for that explanation, underbuild an all. :-)

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Rhodri James
On 10/12/2019 19:25, R.Wieser wrote: And to repeat, you have*no* guarantee*at all* in the language spec that this will happen. There is also absolutily no guarantee in those specs that my 'puter will not suddenly transform into a bonzai tree. Should I now expect it to happen ? That's an im

Re: Python3 - How do I import a class from another file

2019-12-10 Thread MRAB
On 2019-12-10 19:25, R.Wieser wrote: Rhodri, the object that is the integer 5 *isn't* deleted That was not the question. And you're now referring to the object as well as the integer, which makes it confusing. You also have not explained what happens instead. In short, your above statement

Re: Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
Rhodri, > the object that is the integer 5 *isn't* deleted That was not the question. And you're now referring to the object as well as the integer, which makes it confusing. You also have not explained what happens instead. In short, your above statement has ZERO value to me. > On the cont

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Roel Schroeven
R.Wieser schreef op 10/12/2019 om 13:44: Also, when you scorn something without knowing your facts, you tend to make yourself look like a fool :) I tend to go with logic. No logic => it most likely doesn't work that way. Choosing to go with a delayed action like you say will, as I already e

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Rhodri James
On 10/12/2019 19:00, R.Wieser wrote: MRAB, You merely disabled the mark-and-sweep collector. Nope. Go check the docs on "gc" Yep. Go and check the docs on "gc" *carefully* *plonk* -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Chris Angelico
On Wed, Dec 11, 2019 at 6:06 AM R.Wieser wrote: > > MRAB, > > > You merely disabled the mark-and-sweep collector. > > Nope. Go check the docs on "gc" > https://docs.python.org/3/library/gc.html """ This module provides an interface to the optional garbage collector. ... Since the collector sup

Re: Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
MRAB, > You merely disabled the mark-and-sweep collector. Nope. Go check the docs on "gc" Regards, Rudy Wieser -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Chris Angelico
On Wed, Dec 11, 2019 at 5:51 AM R.Wieser wrote: > > Michael, > > >> So, only the reference count gets lowered. Yep, thats daft. > > > > Why? Consider: > > You missed the point. > > It was-and-is not about decrementing a reference but still having it above > zero, but what happens when the refere

Re: Python3 - How do I import a class from another file

2019-12-10 Thread R.Wieser
Michael, >> So, only the reference count gets lowered. Yep, thats daft. > > Why? Consider: You missed the point. It was-and-is not about decrementing a reference but still having it above zero, but what happens when the reference becomes zero: is the __del__ method called directly (as I find

  1   2   3   4   5   6   7   8   9   10   >