![]() I find async a bit of overkill since this is a shell script but if this is only way I can avoid a C dependency, I will deal with it. I want to "call" the "member" GetInhibitors The "path" is "/org/gnome/SessionManager" On top of that, I think I have worked out these points: But this exercise is to allow us to use dbus through Python code. The above is a fancy (and painstaking) way to run systemctl status rvice. Look through all the different methods from the introspection to see exactly what you can do through dbus. I now understand why the php script I am trying to re-write in python executed a shell command and dealt with the ugly output. The output (on my machine) is an expected (‘enabled’,). So at this point, I have a library which is old and not recommended, a library with dependency difficulties and a library which seems to force me to use asyncio. and ERROR: failed building wheel for pycairo. I tried using dasbus but I can't install the necessary libraries, at least not in a virtual env.ĭespite installing the system package python3-gi, I get errors "no module named gi" and trying to install PyGObject fails because "no package 'cairo' found". ![]() However it seems that the pure python approach requires me to use the asyncio version. ![]() It is not mentioned on the wiki page mentioned above, but it looks like a healthy project. The library promises a pure python implementation: "Zero dependencies and pure Python 3." I learn this about the apparently canonical library: "dbus-python is a legacy API, built with a deprecated dbus-glib library, and involving a lot of type-guessing (despite "explicit is better than implicit" and "resist the temptation to guess") (from ) The first place to start was I hoped a good python library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |