473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Tkinter, main loop question.

Don't know if its possible in this light-weight GUI toolset, but can i
somehow hook up into the mainloop in it, for example if i were to
create an internet application, i would need to keep recieving data
from within it?

Nov 23 '06 #1
2 2209
"Exod" <ra*******@gmail.comwrote:

Don't know if its possible in this light-weight GUI toolset, but can i
somehow hook up into the mainloop in it, for example if i were to
create an internet application, i would need to keep recieving data
from within it?
Its possible - use the call back mechanism to implement a ticker or stutter
thread, remembering that you cant block here, because then the gui stops.

If its a good idea is another question, because sockets wants to be the main
thread too.

but if you fire up another process for the comms, and use threads in front of
pipes, with queues to the ticker in the main loop, it works. Just don't call any
gui stuff from threads in the same process, only from the ticker or stutter
thread.

- Hendrik
Nov 23 '06 #2
Exod wrote:
Don't know if its possible in this light-weight GUI toolset, but
can i somehow hook up into the mainloop in it, for example if i
were to create an internet application, i would need to keep
recieving data from within it?
That's something where you could try the Twisted framework
(http://twistedmatrix.com). Its event loop integrates with many GUI
toolkits', also Tk's.

Regards,
Björn

--
BOFH excuse #394:

Jupiter is aligned with Mars.

Nov 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Russell E. Owen | last post by:
I have a Python/Tkinter remote control application and want to add support for running user scripts. I would like the scripts to be written in python, would like them to be able to update...
5
by: george.trojan | last post by:
My application consists of Tkinter GUI that has to communicate with a remote server. The communication is bi-directional: the GUI responds to remote requests and user actions uch as pressing a...
4
by: Jeffrey Barish | last post by:
I'm confused about how to use the update_idletasks method. In my program, I have a handler for a button in which execution will linger. During that time, I would like for the GUI to continue to...
2
by: k2riddim | last post by:
Hello, I'm a beginner with Python and Tkinter development. My application parse links in an html file. And I use Tkinter to implement a GUI. This GUI has a button to launch the parse treatment,...
9
by: Tuvas | last post by:
I am building a tkinter program. A part of this program is to read data from an incoming interface, and depending on the data, will display a bit of text on the tk dialog, it decodes this data, so...
14
by: Hendrik van Rooyen | last post by:
Hi, I get the following: hvr@LINUXBOXMicrocorp:~/Controller/libpython display.py UpdateStringProc should not be invoked for type font Aborted and I am back at the bash prompt - this is...
2
by: Kevin Walzer | last post by:
I'm trying to decide whether I need threads in my Tkinter application or not. My app is a front end to a command-line tool; it feeds commands to the command-line program, then reads its output and...
2
by: Kevin Walzer | last post by:
I'm porting a Tkinter application to wxPython and had a question about wxPython's event loop. The Tkinter app provides a GUI to a command-line tool. It gathers user input, and opens an...
3
by: joshdw4 | last post by:
I hate to do this, but I've thoroughly exhausted google search. Yes, it's that pesky root window and I have tried withdraw to no avail. I'm assuming this is because of the methods I'm using. I...
7
by: gordon | last post by:
is it possible to send a message to the gui instance while the Tk event loop is running?I mean after i create a gui object like root=Tk() mygui=SomeUI(root) and call root.mainloop() can i...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.