Hi, Bvdet:
Thanks a lot!
Haiyan
User Profile
Collapse
-
I figured out. I can send the checked checkbox to server side if I only use one form.Leave a comment:
-
I figured out. I can send the checked checkbox to server side if I only use one form.Leave a comment:
-
How to return a matrix of checkbox from client to server side?
Dear Web application experts:
I am trying to use Cherrypy to do one web application. I used the cheetah template to generate the HTML file for a matrix of checkbox, and hope to return the checked checkbox information to server side. Because I already used the form for quick selection, and HTML doesn't support nested form. Could you please point me to right way to get the checked checkbox information to server side for handling?... -
How to return a matrix of checkbox from client to server side?
Dear Python experts:
I am trying to use Cherrypy to do one web application. I used the cheetah template to generate the HTML file for a matrix of checkbox, and hope to return the checked checkbox information to server side. Because I already used the form for quick selection, and HTML doesn't support nested form. Could you please point me to right way to get the checked checkbox information to server side for handling?
Following is... -
How can I schedule a task to run every 10 seconds in Python?
Dear Experts:
I am writing one test program with Python which is running multiple threads in parallel. I hope to add another thread to display the test status every 10 seconds. Could you please tell me how I can schedule a task to run every 10 seconds in Python?
I defined one function return_status() and tried the Timer object of threading as follows, but it only run once after 10 seconds. I hope it can run multiple... -
Since you are using the csv module and the default line termination sequence is '\r\n', that's why you get a new line. You can try following way and it should work for you.
Code:writer.writerow(yourrow, lineterminator = '\r')
Leave a comment:
-
Haiyan replied to Any idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?in PythonHi, Bvdet:
Thanks a lot!
Yes, the credit should give to both Fredrik Lundh and you!
I also tried another piece of script and merged into the original class and it also works. The script is as follows:
Code:self.canv = Canvas ( self, width=1200, height=800, scrollregion=(0, 0, 1200, 800) ) self.canv.grid ( row=0, column=0 ) self.scrollY = Scrollbar
Leave a comment:
-
Haiyan replied to Any idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?in PythonHi, Bvdet:
You are welcome! But I still have trouble to merge into my original class definition. You know the solution I post above is to create one canvas with scrollbar, then create one frame on the canvas, then put the table of checkbox into the frame.
When I am trying to merge into my original class definition. I didn't understand the relationship of self, self.master and canvas and didn't get it implemented correctly....Leave a comment:
-
Haiyan replied to Any idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?in PythonHi, Bvdet:
Thanks a lot for your help! I modified the script based on your suggestion, and looks like get it working. But I don't like the following implementation, and I hope to keep my original class definition because I need to use the scroll bar lots of places.
Following is the working code but not in class definition:
Code:from Tkinter import * class AutoScrollbar(Scrollbar): # a scrollbar
Leave a comment:
-
Haiyan replied to Any idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?in PythonI modified the scroll bar and canvas part a little bit from self to self.master as follows, and now x-scroll bar showed up as well, but contents on the canvas still doesn't move when scroll the scrollbar.
Code:# Scroll bar xscrollbar = Scrollbar(self.master, orient=HORIZONTAL) xscrollbar.grid(row=1, column=0, sticky=E+W) yscrollbar = Scrollbar(self.master) yscrollbar.grid(row=0,
Leave a comment:
-
Haiyan started a topic Any idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?in PythonAny idea why Tkinter scrollbar scrolls but contents on canvas didn't move together?
Dear experts:
I am trying to add one xy-scrollbar on the canvas, then put lots of check buttons on the canvas. I got at least following 2 problems:
1.I can see the y-scroll bar but contents on canvas didn't move together when scroll y-scrollbar.
2.The x-scrollbar didn't show up as expected.
Do you have any idea? Thank you very much in advance!
Best regards,
Haiyan
... -
Haiyan replied to Any idea why execfile() call in Tkinter button cause "python.exe has stopped working"in PythonNow I moved the destructor running out of main GUI and only run after main GUI terminated. The Python didn't get crashed any more.Leave a comment:
-
Haiyan replied to Any idea why execfile() call in Tkinter button cause "python.exe has stopped working"in PythonHi, bvdet:
Thanks a lot for your suggestions!
I did try following 4 options and they didn't work:
1:
self.Start_Test _Window.withdra w()
execfile("BootS cript.py", globals())
2:
execfile("BootS cript.py", globals())
self.Start_Test _Window.withdra w()
3:
execfile("BootS cript.py", globals())
self.Start_Test _Window.destroy ()...Leave a comment:
-
Haiyan started a topic Any idea why execfile() call in Tkinter button cause "python.exe has stopped working"in PythonAny idea why execfile() call in Tkinter button cause "python.exe has stopped working"
Dear Experts:
I made one GUI interface with Tkinter. I have some buttons on the GUI and one button is designed as "start test" which will invoke one "start test" window. I put one "ok" and one "cancel" button in this window. When I click the "ok" button it will use execfile() to call another python file which will start multiple threads to run. The multiple threads did finish but I... -
Your suggestions work great! I merged your changes in and it worked exactly what I want. Thanks a lot for your help!Leave a comment:
-
How I can use the command correctly in checkbutton?
Dear experts:
I am trying to write one slot matrix manager which consists of 4 columns and 24 rows (total 96 slots). So I put one checkbutton matrix with 5 columns and 25 rows slot.
The check/uncheck of checkbutton[0][0] will toggle all 96 slots.
The check/uncheck of checkbutton[1][0] will toggle all 24 slots in column 1.
The check/uncheck of checkbutton[0][1] will toggle all 4 slots in row 1.
The check/uncheck...
No activity results to display
Show More
Leave a comment: