473,387 Members | 1,545 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,387 software developers and data experts.

GTK progress bar not working properly with pulse()

My python file(progressbar.py) looks like the following:

pbar = gtk.ProgressBar()

def updateBar(percentage):
print percentage
pbar.pulse()

class ProgressBar:
def __init__(self):
# other gui codes

align.add(pbar)
pbar.show()

My C++ codes look like the following:

for ( int percent = 0; percent < 100; percent++ )
{
PyObject* importModule = PyImport_ImportModule("progressbar");

if ( importModule == NULL )
printf("not good\n");
PyObject* callResult = PyObject_CallMethod(importModule,
"updateBar", "i", percent, NULL);
if ( callResult == NULL )
printf("not good enough\n");

Py_XDECREF(importModule);
}

I run the above C++ code from python by clicking a button. The problem
is that when I print the percentage from the python side, it works
fine, but when I call the pulse() method for ProgressBar, nothing gets
updated on my GUI. Do I have to do anything else with the pbar object
to make it display properly?

Jul 19 '05 #1
0 1286

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

Similar topics

16
by: Paul | last post by:
i have been working with vb6 for a while but never had the pleasure of using progress bars. That is until now, one of the programs i have written has just been modified so that large csv files of...
1
by: Steven Blair | last post by:
Hi, Having a bit of a problem with the Progress Bar and Timer component. Basically, when I execute a menu option, I need the progress bar to start working. I have managed this and start the...
4
by: Raed Sawalha | last post by:
Dear, I have windows form , the form is using a class to do all tasks needed like this private void btnProcess_Click(object sender, System.EventArgs e) { btnProcess.Enabled = false;...
11
by: simon | last post by:
when I execute aspx page, it works about 5 minutes - I calculate some statistics. Is there some way, that I can show user time bar or smething similar? That he nows, that page is working. ...
2
by: Geoff Jones | last post by:
Hi I have been using a smooth progress control using the following link: http://support.microsoft.com/default.aspx?scid=kb;en-us;323088#2 It works well, however I can't seem to get it to...
12
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock...
6
by: Vikas Kumar | last post by:
Hi if I want to show a progress bar in my web application how can i do it Like this much % of task has been completed as its shown when installing some desktop application i want to do same in my...
15
by: eladla | last post by:
Hi! I am creating a composite control the does some of it`s own data access. I want to display a progress bar between the time the page is loaded and the control place holder is displayed and...
2
by: DeveloperX | last post by:
Hi, Below is a hacked up version of an example I found on MSDN. My only change was to add a third thread and some Sleeps. That's where my question(s) comes in. In the original it seems to work...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
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,...

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.