Re: [Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?

2019-07-31 Thread Chris Roy-Smith
On 31/7/19 2:21 am, boB Stepp wrote: I have been using various iterations of a solitaire scorekeeper program to explore different programming thoughts. In my latest musings I am wondering about -- in general -- whether it is best to store calculated data values in a file and reload these

Re: [Tutor] is there a graphics library for common tkinter Button functions?

2019-03-21 Thread Chris Roy-Smith
On 21/3/19 10:19 am, Alan Gauld via Tutor wrote: On 20/03/19 22:43, Chris Roy-Smith wrote: Is there a "graphics library" of common button uses? that is things like forward record, back record, 1st record, last record, printer, save and the likes. The short answer is no. But you

[Tutor] is there a graphics library for common tkinter Button functions?

2019-03-20 Thread Chris Roy-Smith
Hi, Is there a "graphics library" of common button uses? that is things like forward record, back record, 1st record, last record, printer, save and the likes. I don't have very artistic abilities, so would prefer to save making my own library. Thank you Chris

Re: [Tutor] Tkinter: Can's figure out how to put a frame in a second window

2019-03-09 Thread Chris Roy-Smith
On 9/3/19 10:13 pm, Alan Gauld via Tutor wrote: On 09/03/2019 02:53, Chris Roy-Smith wrote: What is happening is that the contents of the frame appear in the master window. I was expecting them to show in the second window. Also I expected the frame to be sunken, but there is no obvious signs

[Tutor] Tkinter: Can's figure out how to put a frame in a second window

2019-03-09 Thread Chris Roy-Smith
. Also I expected the frame to be sunken, but there is no obvious signs of the frame, not even a colored background. What am I doing wrong? Thank you, Chris Roy-Smith here is my code: #! /usr/bin/python3 from tkinter import * def NewWindow():     sw=Toplevel(master)     sw.title('New Window

[Tutor] why can use a widget assigned to a variable or just use it on it's own?

2018-07-02 Thread Chris Roy-Smith
) main.mainloop() === any explanation gratefully recieved Regards, Chris ROy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to change the command "string" on a tkinter Button?

2018-07-01 Thread Chris Roy-Smith
On 01/07/18 19:19, Steven D'Aprano wrote: On Sun, Jul 01, 2018 at 03:32:59PM +1000, Chris Roy-Smith wrote: Python is the first language I have attempted since macro assembler for CP/M. Python seems to be another world. Yes indeed, high-level languages like Python *are* a radically different

Re: [Tutor] how to change the command "string" on a tkinter Button?

2018-07-01 Thread Chris Roy-Smith
On 01/07/18 02:17, Alan Gauld via Tutor wrote: On 30/06/18 03:55, Chris Roy-Smith wrote: I am trying to change the command of a tkinter Button in my program. Eventually I want to be able to do this to many buttons. Since I'm not 100% sure if you mean the command or the label or both here

Re: [Tutor] how to change the command "string" on a tkinter Button?

2018-07-01 Thread Chris Roy-Smith
On 01/07/18 02:17, Alan Gauld via Tutor wrote: On 30/06/18 03:55, Chris Roy-Smith wrote: I am trying to change the command of a tkinter Button in my program. Eventually I want to be able to do this to many buttons. Since I'm not 100% sure if you mean the command or the label or both here

[Tutor] how to change the command "string" on a tkinter Button?

2018-06-30 Thread Chris Roy-Smith
rked around the problem by destroying  the window and building it again, but it was pointed out that I have an unusual coding style doing this. All hints appreciated! Regards, Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] tkinter code executes before function returned

2018-04-16 Thread Chris Roy-Smith
On 15/04/18 18:10, Alan Gauld via Tutor wrote: On 15/04/18 03:57, Chris Roy-Smith wrote: I am trying to get tkinter to return a number from a window, which then sets how many times to print a sign. I don;t jhave time to look at this in detail just now, maybe later. But first impressions

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Chris Roy-Smith
, Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] tkinter code executes before function returned

2018-04-15 Thread Chris Roy-Smith
de to wait till getcount() returns it's value? Any help greatly appreciated. Regards, Chris Roy-Smith chris@chris-X451MA:~/Scripts/python3/dvms$ ./debug1.py line 27 ###   required sign count for D is None   ### Exception in Tkinter callback Traceback (most recent call last):   File "/usr/lib/py

[Tutor] thinter: can't figure out how to update a window instead of creating a new on

2018-01-28 Thread Chris Roy-Smith
assistance, I'm hoping to learn something from this experience Regards, Chris Roy-Smith #!/usr/bin/python3 import mysql.connector from tkinter import * import pickle master = Tk() def getCfg():     fobj = open('members.pkl', 'rb')     cfg = pickle.load(fobj)     fobj.close()     return cfg

Re: [Tutor] trouble using tkinter CheckButton

2018-01-16 Thread Chris Roy-Smith
On 16/01/18 22:35, Alan Gauld via Tutor wrote: On 16/01/18 04:37, Chris Roy-Smith wrote:   File "./debugString.py", line 7, in SetFin     SetStatus[x] = var.get(x) AttributeError: 'list' object has no attribute 'get' var=[IntVar() for x in range(8)] Here you create a list

[Tutor] trouble using tkinter CheckButton

2018-01-16 Thread Chris Roy-Smith
en things down to what I think is as simple as I can get. Thank you for looking at this, Regards, Chris Roy-Smith Error message: = chris@chris-X451MA:~/Scripts/python3/dvms$ ./debugString.py Exception in Tkinter callback Traceback (most recent call last):   File "

Re: [Tutor] problems using a listbox

2017-10-17 Thread Chris Roy-Smith
ks, I have difficulties with object oriented coding. Never used a language where I needed it. Regards, Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] problems using a listbox

2017-10-17 Thread Chris Roy-Smith
p Regards, Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] is there a better way to do this?

2016-05-10 Thread Chris Roy-Smith
On 10/05/16 07:03, Ondřej Rusek wrote: Dne 9.5.2016 v 10:13 Chris Roy-Smith napsal(a): Hi Python 3.4 Linux (ubuntu) This code does what I want. curs is the result of a mysql query data = [[" " for x in range(9)] for y in range(count)] for (ddate, mood, walk, lag, sleep) in curs:

Re: [Tutor] is there a better way to do this?

2016-05-10 Thread Chris Roy-Smith
On 10/05/16 12:01, Steven D'Aprano wrote: On Mon, May 09, 2016 at 06:13:32PM +1000, Chris Roy-Smith wrote: data = [[" " for x in range(9)] for y in range(count)] for (ddate, mood, walk, lag, sleep) in curs: data[row][0]=ddate data[row][1]=mood data[ro

[Tutor] is there a better way to do this?

2016-05-09 Thread Chris Roy-Smith
ata[row][3]=lag data[row][4]=sleep row +=1 While I don't know a better way to do this, it seems a bit awkward, is there a better way? Thank you Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

Re: [Tutor] Why does this function execute before being called?

2015-11-07 Thread Chris Roy-Smith
On 07/11/15 20:18, Alan Gauld wrote: On 07/11/15 04:34, Chris Roy-Smith wrote: def genF(ofield): ... for x in range(10): def second(): main=Toplevel(root) ofield=Text(main, height=15, width=15) ofield.pack() B3=Button(main, text='exit', command=main.destroy) B3

[Tutor] Why does this function execute before being called?

2015-11-07 Thread Chris Roy-Smith
Hi, Environment: Python 2.7 Linux (Ubuntu 15.10) I am experiencing a problem with the code below running the "genF" function on opening the second window. I expected that function to be executed on clicking the 'fill text' button. The text widget gets filled on opening the window. This is my

Re: [Tutor] [Tkinter-discuss] tkinter file dialog pattern matching (fwd)

2015-08-24 Thread Chris Roy-Smith
On 23/08/15 23:52, Laura Creighton wrote: oooh. Seems that there is an undocumented feature we can use! Laura --- Forwarded Message Return-Path: tkinter-discuss-bounces+lac=openend...@python.org Date: Sun, 23 Aug 2015 12:40:02 +0200 From: Michael Lange klappn...@web.de To:

Re: [Tutor] filtering listed directories

2015-08-23 Thread Chris Roy-Smith
On 23/08/15 00:42, Laura Creighton wrote: In a message of Sat, 22 Aug 2015 14:32:56 +0100, Alan Gauld writes: But maybe some questions on a Tix (or Tk) forum might get more help? Once you know how to do it in native Tcl/Tk/Tix you can usually figure out how to do it in Python. -- Alan G I

Re: [Tutor] filtering listed directories

2015-08-23 Thread Chris Roy-Smith
On 22/08/15 23:32, Alan Gauld wrote: On 22/08/15 11:43, Laura Creighton wrote: How can I filter out these hidden directories? Help(tkFileDialog) doesn't help me as it just shows **options, but doesn't show what these options might be. tix (tkinter extensions)

Re: [Tutor] filtering listed directories

2015-08-23 Thread Chris Roy-Smith
On 23/08/15 18:13, Laura Creighton wrote: In a message of Sun, 23 Aug 2015 13:09:41 +1000, Chris Roy-Smith writes: On 22/08/15 23:32, Alan Gauld wrote: On 22/08/15 11:43, Laura Creighton wrote: How can I filter out these hidden directories? Help(tkFileDialog) doesn't help me as it just shows

[Tutor] filtering listed directories

2015-08-22 Thread Chris Roy-Smith
Hi, environment: Python 2.7, Ubuntu 12.4 Linux I am trying to get the list of directories shown by tkFileDialog.askdirectory to not show hidden files (starting with .) this code results in lots of hidden directories listed in the interface making things harder than they need to be for the

Re: [Tutor] Abs

2015-07-27 Thread Chris Roy-Smith
On 27/07/15 11:06, Job wrote: I want to be able to ask a user to input an integer and print out the root and power of the given integer. Why do you use abs(x) for this program? I don't understand or see the link between abs() and root and powers. This reminds me of this: By knowing that when

Re: [Tutor] tkinter window not showing max, min and close buttons

2015-07-21 Thread Chris Roy-Smith
On 21/07/15 21:52, Alan Gauld wrote: On 21/07/15 08:15, Chris Roy-Smith wrote: On 21/07/15 17:02, Alan Gauld wrote: On 21/07/15 06:05, Chris Roy-Smith wrote: I am working my way through Alan Gauld's tutorial and have just started the section on GUI. The windows that are created look odd

Re: [Tutor] tkinter window not showing max, min and close buttons

2015-07-21 Thread Chris Roy-Smith
On 22/07/15 08:07, Chris Roy-Smith wrote: On 21/07/15 21:52, Alan Gauld wrote: On 21/07/15 08:15, Chris Roy-Smith wrote: On 21/07/15 17:02, Alan Gauld wrote: On 21/07/15 06:05, Chris Roy-Smith wrote: I am working my way through Alan Gauld's tutorial and have just started the section on GUI

Re: [Tutor] tkinter window not showing max, min and close buttons

2015-07-21 Thread Chris Roy-Smith
On 21/07/15 17:02, Alan Gauld wrote: On 21/07/15 06:05, Chris Roy-Smith wrote: I am working my way through Alan Gauld's tutorial and have just started the section on GUI. The windows that are created look odd with no title bar or maximise, minimise or close window button. The simplest

[Tutor] tkinter window not showing max, min and close buttons

2015-07-20 Thread Chris Roy-Smith
? Thank you Chris Roy-Smith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor