diff options
author | David Robillard <d@drobilla.net> | 2011-02-12 19:53:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-12 19:53:08 +0000 |
commit | 053f1f082fe2603949050da99a76e6e799335c22 (patch) | |
tree | cf30776758aabc39b346f5f72b4286f6b9389d09 /swig | |
parent | a4b1d7318f7cfc752ac3a8858006c0d6c796553e (diff) | |
download | lilv-053f1f082fe2603949050da99a76e6e799335c22.tar.gz lilv-053f1f082fe2603949050da99a76e6e799335c22.tar.bz2 lilv-053f1f082fe2603949050da99a76e6e799335c22.zip |
Wrap rest of API (with a few troublesome exceptions).
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2942 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'swig')
-rwxr-xr-x | swig/python/lv2_list.py | 6 | ||||
-rw-r--r-- | swig/slv2.i | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/swig/python/lv2_list.py b/swig/python/lv2_list.py index 0cd6a1b..4b09e86 100755 --- a/swig/python/lv2_list.py +++ b/swig/python/lv2_list.py @@ -5,8 +5,8 @@ import slv2 world = slv2.World() world.load_all() -plugins = world.get_all_plugins() - -for i in plugins: +for i in world.get_all_plugins(): print(i.get_uri()) + + diff --git a/swig/slv2.i b/swig/slv2.i index cb5279a..bff9f70 100644 --- a/swig/slv2.i +++ b/swig/slv2.i @@ -3,9 +3,12 @@ #include "slv2/slv2.h" #include "slv2/slv2mm.hpp" %} + %include "slv2/slv2.h" %include "slv2/slv2mm.hpp" + namespace SLV2 { + %extend Plugins { %pythoncode %{ def __iter__(self): @@ -27,10 +30,19 @@ namespace SLV2 { return Iterator(self) %} }; + %extend Value { %pythoncode %{ def __str__(self): return slv2_value_get_turtle_token(self.me) %} }; -} + +%extend World { +%pythoncode %{ + def get_plugin(self, uri_str): + return Plugin(slv2_world_get_plugin_by_uri_string(self.me, uri_str)) +%} +}; + +} /* namespace SLV2 */ |