On Sat, Sep 20, 2008 at 4:10 PM, dmitrey <dm*******@ukr. netwrote:
>
hi all,
I have the problem:
a func has been binded to a Button:
RunPause = Button(root, textvariable = t, command = lambda:
invokeRunPause( p))
def invokeRunPause( p):
if p.state == 'init':
p.state = 'running'
t.set(' Pause ')
p.GUI_root.upda te_idletasks()
p.tmp_result = p.solve(*p._arg s, **p._kwargs)
elif p.state == 'running':
....
So the problem is that I can't invoke the button RunPause till my
calculations (in p.solve()) will be finished. I can observe it even
graphically, the button doesn't respond when it is pressed.
Could anyone provide a solution?
It is not only the button that doesn't respond, the entire application
won't respond if you are blocking tcl from processing anything. This
call to p.solve blocks, and, in turn the interpreter can't process
events and the GUI remains frozen till p.solve returns.
Ideally you should break this p.solve in steps, so you can schedule
next steps and the GUI will remain responsible, but if you can't break
it, and if it doesn't make sense to run it in another process then you
use a thread to solve this.
>
Thank you ion advance, Dmitrey.
--
View this message in context: http://www.nabble.com/%28newbie%29-c...p19588292.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
_______________ _______________ _______________ __
Tkinter-discuss mailing list Tk************* @python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
--
-- Guilherme H. Polo Goncalves 0 1261 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 Tkinter widgets and (the hard part) would also like them
to be capable of pausing until some condition is met (e.g. a remote
control command finishes) without hanging the event loop.
I plan to add a library of routines to send commands and wait for...
|
by: Roland |
last post by:
Salut,
J'utilise LNUX RedHat 9.0 et je n'arrive pas à utilser Tkinter
car à chaque fois que j'essaye de faire executer un code dans lequel
j'ai importé le module Tkinter, j'obtient:
from tkinter import*
ImportError: No module named tkinter .
Je croyais que ce module était intégré à python.
AIDEZ-MOI
|
by: codecraig |
last post by:
Hi,
I was reading through the Tkinter tutorial at
http://www.pythonware.com/library/tkinter/introduction/index.htm ...and
it mentions that by doing,
from Tkinter import *
you have access to the constants in Tkconstants, since Tkinter imports
it automatically.
|
by: Peter G Carswell |
last post by:
Good Morning.
I am new to Tkinter. I have been testing the installation of Tkinter
through the python web site. The first two test steps give no errors,
'import _tkinter' and 'import Tkinter'. However, the third step,
'Tkinter._test', gives the error:
<function _test at 0xb7ec8df4>
Any suggestions?
|
by: John Chambers |
last post by:
Sp my latest adventure is attempting to use python's Tkinter module on a few machines.
On my PB (OSX 10.3.9), I got the following confusing results:
/Users/jc: python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in ?
| |
by: Kevin Walzer |
last post by:
I'm not sure how often members of this list visit the Tkinter wiki at
http://tkinter.unpythonic.net/wiki/FrontPage; this wiki seems to have
less traffic in general than the Tcl/Tk wiki at http://wiki.tcl.tk.
Given that, I hope it's not out of line for me to call attention to
several pages that I've posted about integrating Tile
(http://tktable.sourceforge.net/tile) and TableList
(http://www.nemethi.de, http://wiki.tcl.tk/5527) into...
|
by: bg_ie |
last post by:
Hi,
I'm in the process of writing some code and noticed a strange problem
while doing so. I'm working with PythonWin 210 built for Python 2.5. I
noticed the problem for the last py file processed by this script,
where the concerned tmp file is only actually written to when
PythonWin is closed. In other words, after I run this script, one of
the generated tmp files has a size of 0kB. I then close PythonWin and
it is then written to.
|
by: vijayca |
last post by:
my python installation is:Active python 2.5.1
i am using Red Hat Linux
i have the Tkinter module installed but any simple script produces an
error....
script:
from Tkinter import Label
widget = Label(None, text='Hello GUI world!')
widget.pack()
widget.mainloop()
|
by: karthikbalaguru |
last post by:
Hi,
One of my python program needs tkinter to be installed to run
successfully.
I am using Redhat 9.0 and hence tried installing by copying the
tkinter-2.2.2-36.i386.rpm
alone from the CD 3 to my pc. But, it is not getting installed and is
failing by throwing
the below errors. Should i need to configure / install any specific
files for resolving this issue ?
|
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 guess my question
is two-fold.
1) How do I get rid of that window?
2) Any comments in general? I am just learning python (and coding with
classes), so I'm sure there are things I should pound into my head
before I learn bad habits.
Here's the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |