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 followi
Calling a python method from C++ has the following signature:
PyObject *
PyObject_CallMethod(PyObject *self, char *method_name,
char *arg_format, ...);
I'm having trouble figuring out how to declare self.
Let's say my python file is called stuff.py and is like the following,
Let's say I have a python function do some math like the following:
def doMath(self):
self.val = self.val + 1
How can I call this python function from C++? Assuming I have some sort
of Python wrapper around my C++ codes.
--
http://mail.python.org/mailman/listinfo/python-list
Is there some python method which can do the polling you are talking
about? Or can you send me a link to some existing example?
> It is not possible to "listen" to something that is not "emitting"
change
> notifications. Your variable "val" isn't "talking".
>
> Some languages let you listen to eve
Let's say I have the following source code in C++:
// The following is in a .cpp file
int val = 0;
for ( int i = 0; i < 10; i++ )
val = i;
// Now I'm in a python GUI, glade or GTK
Is it possible from the GUI side to listen to changes in the val
variable? Once I notice a change in the variabl