This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Python Reference Plugin

Tags: None
(comma "," separated)
User avatar
rbreu
Registered Member
Posts
52
Karma
0

Python Reference Plugin

Mon Dec 24, 2018 10:46 am
I've written a plugin that gives a quick, searchable overview of Krita's Python API. The reference is built at run-time via Python's introspection abilities looking at the classes in the PyKrita.krita module, so it's always matching the installed Krita version. Since the API doesn't expose any doc strings or method signatures, all the plugin can do at the moment is print method names.

Screenshots and Code on Github

If you find any classes or methods the plugin is missing, let me know.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Python Reference Plugin

Mon Dec 24, 2018 11:06 am
Cool! I wonder if there's a way to add docstrings, maybe to the sip files...
User avatar
rbreu
Registered Member
Posts
52
Karma
0

Re: Python Reference Plugin

Tue Dec 25, 2018 8:17 am
Having docstrings would be super neat. I only know the Python side of things, but the PyQt objects seem to expose at least the method signatures. Which naively I'd have thought shouldn't be too much work since that information must already be in the C++ code, as opposed to actual docstrings that need to be written by humans. ;)


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell