diff options
author | Johan Dahlin <johan@src.gnome.org> | 2008-07-18 20:21:22 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-07-18 20:21:22 +0000 |
commit | 4287c2cc70b02930ed64e9cbec2a0c886ac5d3b7 (patch) | |
tree | 2deb5a2d0b96e4d3e8635d3c9bc65903bad91114 /examples/gio/directory-async.py | |
parent | f0e9c1f49c718a34986cf74821f5ef809217c65c (diff) | |
download | gobject-introspection-4287c2cc70b02930ed64e9cbec2a0c886ac5d3b7.tar.gz |
Wrap gio.File.enumerate_children_async, add tests, docstring and an
* examples/gio/directory-async.py:
* gio/gfile.override:
* gio/gfileenumerator.override:
* gio/gio.defs:
* tests/test_gio.py:
Wrap gio.File.enumerate_children_async, add tests, docstring
and an example.
Also document gio.File.enumerate while we're at it.
svn path=/trunk/; revision=828
Diffstat (limited to 'examples/gio/directory-async.py')
-rw-r--r-- | examples/gio/directory-async.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/gio/directory-async.py b/examples/gio/directory-async.py new file mode 100644 index 00000000..30e22e3d --- /dev/null +++ b/examples/gio/directory-async.py @@ -0,0 +1,14 @@ +import gobject +import gio +import gtk + +def callback(gfile, result): + for file_info in gfile.enumerate_children_finish(result): + print file_info.get_name() + loop.quit() + +gfile = gio.File("/") +gfile.enumerate_children_async("standard::*", callback) + +loop = gobject.MainLoop() +loop.run() |