[pygtk] Pre registered Enumeration

2007-09-18 Thread varun_shrivastava
hi i have started facing one more problem regarding enumerations I made some changes in my c code to register the enumeration with g_param_spec_enum in my class_init function. Now when i try to make the python module, it builds properly but at the time of importing it aborts saying "can not re

Re: [pygtk] Redefining the problem: Related to inheritance

2007-08-28 Thread varun_shrivastava
John Ehresman-2 wrote: > > > Does the .defs file contain a definition for the > gtk_my_displayable_add_command function? It may be mapped using the > name 'add_command' instead of displayable_add_command. > > BTW, I wouldn't call this an inheritance problem because the method is > only def

[pygtk] Redefining the problem: Related to inheritance

2007-08-28 Thread varun_shrivastava
d = PyModule_GetDict (m); 16 pygtkmy_add_constants (m,"GTK_MY_"); 17 pygtkmy_register_classes (d); 18 19 if (PyErr_Occurred ()) { 20 PyErr_Print(); 21 Py_FatalError ("can't initialise module pygtkmy");

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-28 Thread varun_shrivastava
e no declared virtual accessors. ***INFO*** There are no declared interface proxies. i think i m missing something really imp. thanks and regards varun Gian Mario Tagliaretti-3 wrote: > > 2007/8/27, varun_shrivastava <[EMAIL PROTECTED]>: > > Hi Varun, > > please do

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-27 Thread varun_shrivastava
hi i went through the gtk.c file in pygtk source code there i find some function as *_class_init being generated. but i didn't find any like those in my generated code. Is that the problem for not being able to inherit the base class method. varun_shrivastava

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-27 Thread varun_shrivastava
varun_shrivastava wrote: > > > Gian Mario Tagliaretti-3 wrote: >> >> 2007/8/21, varun_shrivastava <[EMAIL PROTECTED]>: >> >>> GtkVBox --> GtkMyDisplayable ---> GtkMyForm >>> >>> GtkMyDisplayable has an api >>> gtk_

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-27 Thread varun_shrivastava
Gian Mario Tagliaretti-3 wrote: > > 2007/8/21, varun_shrivastava <[EMAIL PROTECTED]>: > >> GtkVBox --> GtkMyDisplayable ---> GtkMyForm >> >> GtkMyDisplayable has an api >> gtk_my_displayable_add_command(GtkMyDisplayable >> *displayab

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-20 Thread varun_shrivastava
and("_") it displays following error "form has no attribute displayable_add_command" As you said gtk_window_show is used internally than its for sure that typing window.show() in python will call api of GtkWidget. But in my case its not happening varun_shrivastava wrote: &g

Re: [pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-20 Thread varun_shrivastava
and("_") it displays following error "form has no attribute displayable_add_command" As you said gtk_window_show is used internally than its for sure that typing window.show() in python will call api of GtkWidget. But in my case its not happening Gian Mario Tagliaretti-3 wrot

[pygtk] how to call a method of GtkWidget by using object of GtkWindow

2007-08-20 Thread varun_shrivastava
hi as we know that in gtk programming i can call API of a GtkWidget using an object of GtkWindow by use of type casting MACROS ie i can do as GtkWindow *window=gtk_window_new(); gtk_widget_show(GTK_WIDGET(window)); but in python i can't do this because GtkWindow has its own method gtk

[pygtk] Warning: cannot register existing type

2007-08-20 Thread varun_shrivastava
hi i have inherited some of my widgets from gtk widgets GtkVbox , GtkWidget etc. Also i have extended it to python and named the module as "pymygtkmod.so" I have another library "myapp.so"which uses apis provided by the above shared library. i tried extending it to python but i got an error as

Re: [pygtk] unable to wrap my Interface

2007-08-15 Thread varun_shrivastava
hi i have a query regarding constructors. Is it mandatory to have *_new () function for a widget. Or Can i declare a function like *_new_(). {from the code generation point of view. using pygtk-codegen-2.0} I want to know about it because if we look at the *_wrap.c file generated, we see that if

Re: [pygtk] unable to wrap my Interface

2007-08-15 Thread varun_shrivastava
John Finlay wrote: > > h2def.py doesn't write define-interface lines if I recall correctly - > just change the define-object line. You could try defsgen.py: > > http://svn.gnome.org/viewcvs/pygtk/trunk/codegen/defsgen.py?view=log > > which uses ctypes to generate .defs - its more comprehensiv

[pygtk] unable to wrap my Interface

2007-08-14 Thread varun_shrivastava
hi i have inherited from GTypeInterface, but i am not able to generate the .defs file from the script h2def.py After i run the script, the .defs file show my inherited class as define-object MyInterface but it should be define-interface MyInterface I have no idea why the script is recognizing

Re: [pygtk] import gtk : gives error message

2007-08-09 Thread varun_shrivastava
& ./configure PYTHON=pythonx.x && make && make install (x.x is version of python currently installed) 2. cd pygtk && ./configure PYTHON=pythonx.x && make && make install cheers varun varun_shrivastava wrote: > > i have installed following packag

[pygtk] Error while extending python to gtk widget

2007-08-09 Thread varun_shrivastava
hi i have inherited my own widgets from GtkVbox and i m extending python to it. But when i try to import my module it displays following error message "TypeError: mro() returned base with unsuitable layout ('gtkmy.MyChoice')" ... .. "** (-c:13962): WARNING **: couldn't make the type `gtkmy.MyLis

[pygtk] registering signal callback function

2007-07-03 Thread varun_shrivastava
mmy),) . } and in dummy function i will write the code to call python function "p" will this be OK or is there any other method bye varun_shrivastava wrote: > > hi Felix > >i want to ask, how can i access g_signal_connect_* family of APIs from > p

Re: [pygtk] Pygtk or gtk

2007-07-03 Thread varun_shrivastava
> Hash: SHA1 > > Hi Varun, > > varun_shrivastava wrote: >> hi >> i m new to pygtk >> and want to know how its better to use >> pygtk rather than gtk >> >> what r its pros and cons > > GTK+: > Use GTK+ if your programming l

[pygtk] error: can't initialise module trayicon

2007-07-03 Thread varun_shrivastava
hi i have made a pygtk module, when i try to import it it displays an error message as can't initialise module trayicon whats the problem with my module, is it because my gtk is no properly installed or some other reason. thanks -- View this message in context: http://www.nabble.com/error%3A

[pygtk] regarding use of runtime libraries

2007-07-03 Thread varun_shrivastava
hi i have generated a python extension that worked fine. ie i was able to import it and was able to access its methods and functions but i edited my .c file to include few more methods and functions but now this time my new functions and methods internally calls functions provided by another sh

[pygtk] two constructors for same object

2007-06-29 Thread varun_shrivastava
hi i have 2 constructors one with no arguments and the other with arguments so do i need to wrap them individually or i can have only one wrapper constructor which takes optional arguments. for eg 1st constructor: add_num_new() 2nd Constructor add_num_new_with_numbers(int a, int b) now i can

[pygtk] error: initializer element is not constant

2007-06-28 Thread varun_shrivastava
hi i have inherited an object from GtkVBox, but while compilation it displays error as demobox.c:495: error: initializer element is not constant demobox.c:495: error: (near initialization for `_PyDemoBox_methods[0].ml_meth') .. demobox.c:628: error: syntax error at end of input demobox.c:61

[pygtk] using Py_BuildValue or return statement

2007-06-25 Thread varun_shrivastava
hi Is there a difference between returning a python object using return py_obj; or Py_BuildValue("O",py_obj); -- View this message in context: http://www.nabble.com/using-Py_BuildValue-or-return-statement-tf3974524.html#a11282015 Sent from the Gtk+ - Python mailing list archive at Nabble.com.

[pygtk] positional and keyword parameters

2007-06-22 Thread varun_shrivastava
hi whats the difference between positional and keyword parameter bye -- View this message in context: http://www.nabble.com/positional-and-keyword-parameters-tf3963509.html#a11248497 Sent from the Gtk+ - Python mailing list archive at Nabble.com. __

[pygtk] specifying parent class in .override file : A general question

2007-06-21 Thread varun_shrivastava
hi i have my class derived from GtkWidget so i need to specify it in override file as %% import gtk.Widget as PyGtkWidget_Type so my question is : i have used other gtk classes such as GtkWindow, GtkButton, GtkVbox in my code by "use" i mean to say not deriving any class from them, just using

[pygtk] Override files for every .h file

2007-06-20 Thread varun_shrivastava
hi is it necessary to have a .override file for every .h file? or we can have single .override file for all .h file bye varun -- View this message in context: http://www.nabble.com/Override-files-for-every-.h-file-tf3951946.html#a11211952 Sent from the Gtk+ - Python mailing list archive at N

Re: [pygtk] Unable to wrap enum

2007-06-19 Thread varun_shrivastava
i got it thanks for your help i was not using any of the options like --fhead and all others now i got it thanks for your support Gian varun_shrivastava wrote: > > > > Gian Mario Tagliaretti-3 wrote: >> >> 2007/6/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: &g

Re: [pygtk] Unable to wrap enum

2007-06-19 Thread varun_shrivastava
Gian Mario Tagliaretti-3 wrote: > > 2007/6/19, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > >> > I think a good example is goocavans/pygoocanvas, not because I am one >> > of the authors but because it is a fairly complete example but not as >> > complex as pygtk. > >> where i can find this examp

Re: [pygtk] Unable to wrap enum

2007-06-18 Thread varun_shrivastava
Gian Mario Tagliaretti-3 wrote: > > 2007/6/18, varun_shrivastava <[EMAIL PROTECTED]>: > >> Now when i compile all files to generate the shared objects, it displays >> following error > >> demo.c:123: error: 'HELLO_TYPE_HI' undeclared (first use in

[pygtk] Unable to wrap enum

2007-06-18 Thread varun_shrivastava
hi i m trying to wrap a gobject to python but unable to wrap enumerations .i have a enumeration as shown typedef enum{ HI, HELLO, BYE } HelloHi; the def file generated using h2def.py looks like ;; Enumerations and flags ... (define-enum Hi (in-module "Hello") (c-name "Hello

[pygtk] unable to find gtk.py file

2007-06-14 Thread varun_shrivastava
hi i checked through all the posts in this forum regarding the same and __init.pyc__ exist in my machine and all pygtk programs work but i want to look at gtk.py file, that i m unable to locate on my machine i want to see the pygtk hierarchy implemented. kindly help -- View this message in co

[pygtk] unable to find gtk.py file

2007-06-14 Thread varun_shrivastava
-- View this message in context: http://www.nabble.com/unable-to-find-gtk.py-file-tf3921967.html#a11120831 Sent from the Gtk+ - Python mailing list archive at Nabble.com. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinf

[pygtk] Diiference between method and a function

2007-06-14 Thread varun_shrivastava
hi i was reading about how to define a wrapper function it looks like static PyObject * spam_system(PyObject *self, PyObject *args) { const char *command; int sts; if (!PyArg_ParseTuple(args, "s", &command)) return NULL; sts = system(command); return Py_BuildValue("

[pygtk] Pygtk or gtk

2007-06-13 Thread varun_shrivastava
hi i m new to pygtk and want to know how its better to use pygtk rather than gtk what r its pros and cons varun -- View this message in context: http://www.nabble.com/Pygtk-or-gtk-tf3913322.html#a11095211 Sent from the Gtk+ - Python mailing list archive at Nabble.com.

Re: [pygtk] import gtk : gives error message

2007-06-07 Thread varun_shrivastava
Lauro Moura wrote: > > On 6/6/07, varun_shrivastava <[EMAIL PROTECTED]> wrote: >> >> hi >> i did whats explained in that link, >> but getting errors as >> >> * Setting up X server socket directory /tmp/.X11-unix... >> /scratchbox/to

Re: [pygtk] import gtk : gives error message

2007-06-05 Thread varun_shrivastava
n not permitted invoke-rc.d: initscript x11-common, action "start" failed. i m not a "root user", and sudo is not working :: displays command not found bye varun Lauro Moura wrote: > > On 6/5/07, varun_shrivastava <[EMAIL PROTECTED]> wrote: >> >> hi >&

Re: [pygtk] import gtk : gives error message

2007-06-05 Thread varun_shrivastava
hi i tried with pygtk-2.10.4 but still the same output and i am not able to install regular packages as i want to run it on scratchbox. Scratchbox is a cross-compilation tool. So i need to configure individual packages. bye varun Volker Helm wrote: > > varun_shrivastava schrieb: >

[pygtk] import gtk : gives error message

2007-06-04 Thread varun_shrivastava
i have installed following packages in same order as shown 1) python2.5 2) Glib 2.12.12 3) atk-1.9.1 4) cairo 1.4.6 5) pango 1.16.4 6) gtk+-2.10.0 7) pycairo 1.4.0 8) pygobject 2.13.1 9) pygtk-2.8.6 installation succeeds but while importing gtk following error is displayed Python 2.5 (r25:51908