Hi all,
I'm trying to get the
(continue, skip) = wx.ProgressDial og(...)
but I keep getting an error
I stole the code below from another post regarding the wx.ProgressDial og and it was reported as working there but it gives me the same error. -
-
(before) count: 1, keepGoing: True, skip: False
-
Traceback (most recent call last):
-
File "progdial.py", line 28, in <module>
-
(keepGoing, skip) = dlg.Update(count, newtext)
-
TypeError: 'bool' object is not iterable
-
-
-
import wx
-
import time
-
-
max = 10
-
app = wx.PySimpleApp()
-
dlg = wx.ProgressDialog("Progress dialog example",
-
"variables to be shown here",
-
maximum = max,
-
style = wx.PD_CAN_ABORT
-
| wx.PD_CAN_SKIP
-
#| wx.PD_APP_MODAL
-
| wx.PD_ELAPSED_TIME
-
| wx.PD_ESTIMATED_TIME
-
| wx.PD_REMAINING_TIME
-
)
-
-
keepGoing = True
-
skip = False
-
count = 0
-
-
while keepGoing and count < max:
-
count += 1
-
wx.MilliSleep(1000)
-
#time.sleep(1)
-
newtext = "(before) count: %s, keepGoing: %s, skip: %s " % \
-
(count, keepGoing, skip)
-
print newtext
-
(keepGoing, skip) = dlg.Update(count, newtext)
-
newtext = "(after) count: %s, keepGoing: %s, skip: %s " % \
-
(count, keepGoing, skip)
-
print newtext
-
-
dlg.Destroy()
-
-
I am using Python 2.6.2 and python-wxgtk2.8 on Ubuntu 9.04
Any suggestions are greatly appreceiated, I haven't been able to google up anyone with the same problem.
EJ
2 1972
Nevermind
I did a wxversion.selec t('2.8') and that seems to work.
How can I set that as the default?
In the above code, the skip value is False only for the first iteration. It becomes True after the fist Update() call even if the Skip button has been pushed.
Has anyone else seen this problem?
Whats going on?
EJ
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lukas Kasprowicz |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Folks,
My Proglem is, I get after a query on a mysql database with module MySQLdb a
tuple but I need this output from database as a string.
can anybody help?
- -------------- database ---------
|
by: Carlo v. Dango |
last post by:
Hello there. I have a function which as an argument takes a tuple and
either returns that tuple or a mutated version of it. The problem is that
tuples are imutable, hence I have to create a new tuple and copy the
content of the old tuple to a new one.
But how do I do this if I only at runtime know the size of the tuple? I
wish I could pass around lists instead.. that would be so much easier, but
I'm passing "*args" and "**kwargs" around...
|
by: John Hunter |
last post by:
I am writing a python extension module and have a reference counting
question
My function looks like
static PyObject *
pokereval_seven_cards(PyObject *self, PyObject *args)
{
int i;
|
by: George Sakkis |
last post by:
Why does slicing a tuple returns a new tuple instead of a view of the existing one, given that
tuples are immutable ? I ended up writing a custom ImmutableSequence class that does this, but I
wonder why it is not implemented for tuples.
George
|
by: Nuno Morgadinho |
last post by:
Hello all,
I'm messing around with the Server Programming Interface and the
particular example presented at:
http://www.postgresql.org/docs/current/interactive/spi-examples.html
Ideally, I would want to make the example function return the
information as a "set" and not through elog() so I can later access it
and print it using PHP.
| |
by: Karl O. Pinc |
last post by:
I want to return multiple values, but not a set, only a single row,
from a
plpgsql function and I can't seem to get it to work. (I suppose I'd be
happy to return a set, but I can't seem to make that work either.
Anyway,
what's wrong with this?)
Version is:
$ rpm -q postgresql
|
by: groups.20.thebriguy |
last post by:
I've noticed that there's a few functions that return what appears to
be a tuple, but that also has attributes for each item in the tuple.
For example, time.localtime() returns a time.time_struct, which looks
like a tuple but also like a struct. That is, I can do:
>>> time.localtime()
(2006, 1, 18, 21, 15, 11, 2, 18, 0)
>>> time.localtime()
21
>>> time.localtime().tm_hour
|
by: eros |
last post by:
CREATE OR REPLACE FUNCTION f_customerlogininfo(varchar, varchar, varchar) RETURNS public.v_customerlogininfo AS '
DECLARE
p_schm ALIAS FOR $1;
p_contact ALIAS FOR $2;
p_status ALIAS FOR $3;
v_boolstatus boolean;
BEGIN
IF p_status = ''all'' THEN
RETURN (select * from v_customerlogininfo where contact = p_contact);
ELSE
|
by: Terry Carroll |
last post by:
I'm trying to use wx.ProgressBar, and the cancel button is not
responding.
Here is a simple program that exhibits the problem:
#########################################################
import wx
import time
max = 10
|
by: satyanarayan sahoo |
last post by:
Can we write a method which returns multiple values?
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |