This file is indexed.

/usr/share/doc/geany-plugin-py/README is in geany-plugin-py 1.27+dfsg-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
GeanyPy
=======

Write Geany plugins in Python!

Provides most of the standard Geany C API for Python.

**Please note:** GeanyPy here in geany-plugins is based on the upstream 
at https://github.com/codebrainz/geanypy which is still under 
development, however it is useful as is.  Parts of the existing API 
which mirror the Geany C API will probably not change unless the Geany API 
changes, however new API may be added.  Also documentation is needed, 
contributions are welcome.

.. warning::
   The upstream Geanypy is being updated to use the new proxy plugins mechanism
   which will allow Python plugins to be first class plugins.  This also allows
   them to have keybindings and all the features of C plugins.  This change
   causes some incompatibilities with current plugins, and existing Python plugins will
   need to be upgraded.  It is intended that the version of Geanypy with 
   Geany-Plugins 1.27 will contain the changes, and from that release existing 
   plugins may not work.

How it works
------------

In the ``src/`` directory is a normal Geany plugin (``plugin.c``) which loads the
Python interpreter.  It then loads some C Python modules (``dialogs.c``,
``documents.c``, etc.) that interface with Geany's C API.  After that, it loads
the ``geany`` Python module which is just glue/sugar-coating to make the C
module more "Pythonic".

To write a plugin, inherit from the ``geany.Plugin`` class and implmenent the
required members (see ``geany/plugin.py`` documentation comments).  Then put the
plugin in a searched plugin path.  Currently two locations are search for
plugins.  The first is ``PREFIX/lib/geany`` and the recommended
location is under your personal Geany directory (usually
``~/.config/geany/plugins``). To load or unload plugins, use Geany's regular Plugin
+Manager. Python plugins appear there once GeanyPy is activated.

When the Python Console plugin is enabled, it will add a new tab to the notebook in
the message window area that contains an interactive Python shell with the `geany`
Python shell with the ``geany`` module pre-imported.  You can tinker 
around with API with this console, for example::


    import geany
    
    doc = geany.document.open_file("/some/file/here")
    
    print(doc.file_name)
    print(doc.file_type.display_name)
    
    geany.dialogs.show_msgbox("Hello World")
    
    geany.main_widgets.window.set_title("Hello Window")
    
    def on_document_open(doc):
        print("Document '%s' was opened" % doc.file_name)
    
    geany.signals.connect('document-open', on_document_open)
    

Dependencies
------------

To build GeanyPy you need the following dependencies:

* Python 2.6 or 2.7 and development files.
* Geany 1.24+ and development files
* PyGTK 2.0 and development files

Running on Windows
------------------

Not currently supported for the geany-plugins version, see upstream 
https://github.com/codebrainz/geanypy.

Upstream developed by Matthew Brush.

Geany-plugins version maintained by elextr@lists.geany.org

Known Bugs
----------

* There is an issue with re-loading GeanyPy twice in the same session. If
  you unload the GeanyPy plugin you should restart Geany to avoid a potential
  crash.