2

Where are the Python bindings, or what is the current status of the Python bindings for GIO's GSocket and other lowlevel network support?

Matt Joiner
  • 112,946
  • 110
  • 377
  • 526

2 Answers2

2

The Gnome documentation is known to be somewhat not up to date. One may endlessly say words like community, manpower, time, effort, et cetera.

The fact is that when you do

>>> import gio
>>> help(gio.Socket)

you will see that the class is there (and others too). That is just the doc missing its description.

I suggest in this case the best choice would be to rely on python's inline doc system.

ulidtko
  • 14,740
  • 10
  • 56
  • 88
  • You can also rely on the C docs, which are usually more up-to-date than the Python binding docs. – detly Jan 14 '11 at 01:17
  • @detly: I've taken to using the C docs, deducing corresponding Python nomenclature, and reading the binding source when in doubt. Here's hoping they don't switch to some grotesque thing such as SWIG, or another auto-generated wrapper in the future. – Matt Joiner Jan 14 '11 at 10:56
1

Gio is an API for GVFS.

Python bindings on an Ubuntu system can be installed like this:

sudo apt-get install python-gobject

Then, just

>>> import gio
>>> 
ulidtko
  • 14,740
  • 10
  • 56
  • 88
  • 1
    Doesn't really answer the question, though! – Conrad Meyer Jan 13 '11 at 08:21
  • Doesn't it? You can install the python gobject bindings (or even get the sources), which are part of PyGTK bindings bundle. You can do this in any decent distribution; if you need the vanilla bleeding edge sources - then a bit of more searching is needed ;-) – ulidtko Jan 13 '11 at 08:31
  • This wasn't my question. Take a look at the links I've given, and see the dilemma. – Matt Joiner Jan 13 '11 at 17:41
  • Ah, finally I got it. Your question is about gio classes like GSocket that are missing from python bindings to gio. Well, you should have formulate you question clearer %) – ulidtko Jan 14 '11 at 00:22