The following code does not work correctly on Windows (but does on Linux):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setblocking(True)
sock.connect(address)
gobject.io_add_watch(
sock.fileno(),
gobject.IO_OUT | gobject.IO_ERR | gobject.IO_HUP,
callback)
Snippets o...
I am trying to make a simple commandline client for accessing shares via the python bindings of gio (yes, the main requirement is to use gio).
I can see that comparing with it's predecessor genome-vfs, it provides some means to do authentication stuff (subclassing MountOperation), and even some methods which are quite specific to samba ...
For async IO using Python, is it preferable to rely on gio or gnomevfs?
Also, which one is more "cross-platform"?
...
I would appreciate an example on how to perform an async HTTP POST request using Python's GIO binding.
Edit: Example sought without using Twisted.
...
I have a:
GFile* gf = g_file_new_for_path(file_path);
in my code. But when i try to compile it, I see error:
Undefined reference to: 'g_file_new_for_path'
In include section I have #include <gio/gio.h>
What's wrong in this code?
...