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

2020-08-31 Thread Steve
At least it is working and lets me continue to develop the overall program.
I am working on the option to cancel the update if the user wants.

Since I do not know of a better way, is it not the best at the moment? (-:

My original design to edit the specifications by form was approaching 200
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 pull the updated information from a tkinter form?

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, silly me...
> I did not think of returning the list.

Note that what I showed is probably not the best option.

Usually you would add a button that allows the user to trigger the write
operation.

--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


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, silly me...
> I did not think of returning the list.

Note that what I showed is probably not the best option.

Usually you would add a button that allows the user to trigger the write 
operation.

-- 
https://mail.python.org/mailman/listinfo/python-list


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

2020-08-30 Thread Steve
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, silly me...
I did not think of returning the list.

Thank you, now it is back for another 30 hours of continuous programming...
(:
Steve


Footnote:
"What rhymes with orange?"
"No it doesn't.."

-Original Message-
From: Python-list  On
Behalf Of Peter Otten
Sent: Sunday, August 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 file.

The updated data is in the StringVar-s, which, fortunately, you have
available in a list ;)

So:

> def EditDataByForm():
[...]
> window.mainloop()
  return [spec.get() for spec in New_Specs]

  print(EditDataByForm())
> print ("Done")


--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


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():
[...]
> window.mainloop()  
  return [spec.get() for spec in New_Specs]

  print(EditDataByForm())
> print ("Done")


-- 
https://mail.python.org/mailman/listinfo/python-list