Re: [Tutor] help with Tkinter, please

2006-11-28 Thread wesley chun
> What exactly is the advantage of a daemon thread over a normal > one in that case - other than that the application will end while > daemons are still running? In fact that might be the advantage. > But in that case daemons would only be useful for endless > loop type threads? for example, they

Re: [Tutor] help with Tkinter, please

2006-11-28 Thread Alan Gauld
"wesley chun" <[EMAIL PROTECTED]> wrote >> why do you recommend the use of daemons here? >> Wouldn't that just leave a load of silently running daemon >> threads eating up resources > > are you missing something? :-) i think there is a distinction > bewteen > a daemon/server process and daemon

Re: [Tutor] help with Tkinter, please

2006-11-28 Thread Kent Johnson
wesley chun wrote: >>> "The entire Python program exits when no active non-daemon threads >>> are left." >> why do you recommend the use of daemons here? >> Wouldn't that just leave a load of silently running daemon >> threads eating up resources after the main program finishes? >> I don't see the

Re: [Tutor] help with Tkinter, please

2006-11-28 Thread Kent Johnson
wesley chun wrote: > if your operating system supports daemon > threads, set your unimportant threads as daemon threads -- from the > docs: > > "The entire Python program exits when no active non-daemon threads are left." > > http://docs.python.org/lib/thread-objects.html AFAIK daemon threads ar

Re: [Tutor] help with Tkinter, please

2006-11-28 Thread wesley chun
> > "The entire Python program exits when no active non-daemon threads > > are left." > > why do you recommend the use of daemons here? > Wouldn't that just leave a load of silently running daemon > threads eating up resources after the main program finishes? > I don't see the logic of that one? I'

Re: [Tutor] help with Tkinter, please

2006-11-28 Thread Alan Gauld
"wesley chun" <[EMAIL PROTECTED]> wrote > do the calculations. if your operating system supports daemon > threads, set your unimportant threads as daemon threads -- from the > docs: > > "The entire Python program exits when no active non-daemon threads > are left." Wes, why do you recommend th

Re: [Tutor] help with Tkinter, please

2006-11-27 Thread wesley chun
> >>I have a question about the "EXIT" button's command, > >>command=sys.exit. It fails to quit the program when I've entered too > >>large an integer for factoring, or for prime testing, and I don't > >>want to wait any more for the result. > > > >So, you can see why clicking your exit button won'

Re: [Tutor] help with Tkinter, please

2006-11-27 Thread Dick Moores
At 08:55 PM 11/26/2006, you wrote: >On 27/11/06, Dick Moores <[EMAIL PROTECTED]> wrote: >>I have a question about the "EXIT" button's command, >>command=sys.exit. It fails to quit the program when I've entered too >>large an integer for factoring, or for prime testing, and I don't >>want to wait an

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread John Fouhy
On 27/11/06, Dick Moores <[EMAIL PROTECTED]> wrote: > I have a question about the "EXIT" button's command, > command=sys.exit. It fails to quit the program when I've entered too > large an integer for factoring, or for prime testing, and I don't > want to wait any more for the result. When I'm runn

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Dick Moores
At 06:54 PM 11/26/2006, John Fouhy wrote: >On 27/11/06, Dick Moores <[EMAIL PROTECTED]> wrote: > > Well, I'm having a terrible time with grid(). I do have the 6 buttons > > in the same row, but they're a real mess. Someone please run this and > > tell me how to get them looking better. > >I'm not c

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Dick Moores
At 03:09 PM 11/26/2006, Alan Gauld wrote: >"Dick Moores" <[EMAIL PROTECTED]> wrote > > > Some time has passed and I've made some progress. My question now is > > about the placement of buttons. >... > > one, but I can't get the layout I want, which is the Label on top of > > the Entry, then a row

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread John Fouhy
On 27/11/06, Dick Moores <[EMAIL PROTECTED]> wrote: > Well, I'm having a terrible time with grid(). I do have the 6 buttons > in the same row, but they're a real mess. Someone please run this and > tell me how to get them looking better. I'm not certain exactly what layout you want, but have a loo

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Dick Moores
At 08:59 AM 11/26/2006, Michael Lange wrote: >On Sat, 25 Nov 2006 17:23:39 -0800 >Dick Moores <[EMAIL PROTECTED]> wrote: > > > I've done a lot of fiddling around with setting "side=left", and > > trying to put all the buttons inside a second Frame inside the first > > one, but I can't get the layou

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Alan Gauld
"Dick Moores" <[EMAIL PROTECTED]> wrote > Some time has passed and I've made some progress. My question now is > about the placement of buttons. ... > one, but I can't get the layout I want, which is the Label on top of > the Entry, then a row of the first 3 buttons (which respectively > trigger

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Kent Johnson
Dick Moores wrote: > At 08:59 AM 11/26/2006, Michael Lange wrote: >> On Sat, 25 Nov 2006 17:23:39 -0800 >> Dick Moores <[EMAIL PROTECTED]> wrote: >> >>> I've done a lot of fiddling around with setting "side=left", and >>> trying to put all the buttons inside a second Frame inside the first >>> one,

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Dick Moores
At 08:59 AM 11/26/2006, Michael Lange wrote: >On Sat, 25 Nov 2006 17:23:39 -0800 >Dick Moores <[EMAIL PROTECTED]> wrote: > > > I've done a lot of fiddling around with setting "side=left", and > > trying to put all the buttons inside a second Frame inside the first > > one, but I can't get the layou

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Michael Lange
On Sat, 25 Nov 2006 17:23:39 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > I've done a lot of fiddling around with setting "side=left", and > trying to put all the buttons inside a second Frame inside the first > one, but I can't get the layout I want, which is the Label on top of > the Entry,

Re: [Tutor] help with Tkinter, please

2006-11-25 Thread Dick Moores
At 01:37 PM 11/23/2006, Alan Gauld wrote: >"Dick Moores" <[EMAIL PROTECTED]> wrote > > > def compute_fact(): > > value = int(entry_get()) > > > File "factTk1-a.py", line 22, in compute_fact > > value = int(entry_get()) > > NameError: global name 'entry_get' is not defined > > > > I'm

Re: [Tutor] help with Tkinter, please

2006-11-24 Thread Michael Lange
On Thu, 23 Nov 2006 13:08:40 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > >def compute_fact(): > > value = int(entry_get()) Ooops, sorry for the typo, of course it is entry.get() not entry_get() Michael ___ Tutor maillist - Tutor@python.org ht

Re: [Tutor] help with Tkinter, please

2006-11-23 Thread Alan Gauld
"Dick Moores" <[EMAIL PROTECTED]> wrote > def compute_fact(): > value = int(entry_get()) > File "factTk1-a.py", line 22, in compute_fact > value = int(entry_get()) > NameError: global name 'entry_get' is not defined > > I'm so dumb I don't see how to define it. get is a method o

Re: [Tutor] help with Tkinter, please

2006-11-23 Thread Dick Moores
At 08:01 AM 11/23/2006, Michael Lange wrote: >On Thu, 23 Nov 2006 02:07:17 -0800 >Dick Moores <[EMAIL PROTECTED]> wrote: > > > I think I see how to make a simple GUI with Tkinter, but I still > > don't see how to use one with even a simple, previously non-GUI > > Python script. I'm wondering if som

Re: [Tutor] help with Tkinter, please

2006-11-23 Thread Michael Lange
On Thu, 23 Nov 2006 02:07:17 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > I think I see how to make a simple GUI with Tkinter, but I still > don't see how to use one with even a simple, previously non-GUI > Python script. I'm wondering if someone could create an example for > me, using the 2

[Tutor] help with Tkinter, please

2006-11-23 Thread Dick Moores
I think I see how to make a simple GUI with Tkinter, but I still don't see how to use one with even a simple, previously non-GUI Python script. I'm wondering if someone could create an example for me, using the 2 functions fact() and printFact() at . I'm t