On Tue October 14 2003 00:05, Malcolm Tredinnick wrote:
> On Tue, 2003-10-14 at 10:45, alejandro david weil wrote:
> > first: if i want to reuse objects returned by it, then, I should use the
> > .defs and .override definitions that pygtk's codegen builds? Is there
> > another, more.. manual way to do?
> I don't understand this question. Where do you want to reuse the
> "objects" (and what objects are you talking about)? Maybe an example
> would be good.

I mean classes. Only thing I want from librsvg is a function, that reads a
.svg file an returns a Pixbuf, and I want the Pixbuf created to be of the same
class that python-gtk2 uses for Pixbufs.

> > second: where should I take the pygtk's codegen from? I used the one from
> > my debian's python-gtk2 source packages, but have had lots of problems
> > (for example, doesn't have autoget.sh, to automake/confs problems..).. so
> > i wanted to checkout, if there exists some stable version?
> Whatever comes with the pygtk sources is really the "official" version
> and it works well for its purpose (generating the gnome-python
> bindings).

> Periodically I think that it may not be crazy to release it as a
> separate package, since the .defs format is good for many language
> bindings (it is used by a couple of others) and is relatively simple to
> create for extra packages. I have an unreleased thing at the moment I am
> working on where I used the .defs format to create the Python bindings.
> But I have the same problem you do -- it creates an implicit pygtk
> dependency for a package that doesn't use pygtk.

Mmmh..  the module I made, doesn't seems to import pygtk, is this enough?:

Python 2.3.1 (#2, Sep 30 2003, 00:50:40)
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['__builtins__', '__doc__', '__name__']
>>> import rsvg
>>> dir()
['__builtins__', '__doc__', '__name__', 'rsvg']
>>> dir(rsvg)
['__doc__', '__file__', '__name__', 'rsvg_pixbuf_from_file', 
'rsvg_pixbuf_from_file_at_max_size', 'rsvg_pixbuf_from_file_at_size', 
'rsvg_pixbuf_from_file_at_zoom', 'rsvg_pixbuf_from_file_at_zoom_with_max', 
'rsvg_set_default_dpi']
>>>

..and it works fine, I used to create a Pixbuf, and then, the pixbuf is used in 
pygtk functions without problem.


I asked for the package alone, because, I couldn't get it to work for these
bindings in, about, some hours, and wanted to check documentation or
new releases.

I'm very new with python, and more, with its bindings, and wanted to know,
if, for wrapping a lib. of about 6 functions, without extra data types, and,
requiring only one function to be exported, it has sense to do all that process.
(Anyway, it's possible that the process turned heavy because I'm newbie in this)

> > third: is something like that avaible? where?
> CVS or a released pygtk tarball.

Well, at least, binary packages from debian:
ii  python2.3-gnom 2.0.0-5        Python bindings for GNOME 2
ii  python2.3-gtk2 2.0.0-2        Python bindings for the GTK+ widget set
Seems to doesn't have codegen installed :-(

Thanks for your answer!
-- 
+ There is no dark side of the moon really. Matter of fact it's all dark.

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to