This file is indexed.

/usr/share/gtk-doc/html/ethos/ch02.html is in libethos-doc 0.2.2-2ubuntu1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My first plugin in Python</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Ethos Reference Manual">
<link rel="up" href="ethos-user.html" title="Part I. Ethos User Overview">
<link rel="prev" href="ch01.html" title="My first plugin in C">
<link rel="next" href="ethos-developer.html" title="Part II. Ethos Developer Overview">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ethos-user.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Ethos Reference Manual</th>
<td><a accesskey="n" href="ethos-developer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="idp70456"></a>My first plugin in Python</h2></div></div></div>
<p>
        Python is a great language to quickly develop extensions for an Ethos enabled applications.
        It is so simple in fact, that it is probably easiest to learn by example.
      </p>
<p>
      	Just like plugins in C, we need a plugin description file for our plugin.  In addition to
      	the plugin description file, we need to add a python module that implements our plugin.
      	First off, lets look at the python code required.
      </p>
<p>
        </p>
<div class="informalexample"><pre class="programlisting"># sample.py
import ethos

class SamplePlugin(ethos.Plugin):
    def activate(self):
        print 'Sample plugin activated'
    def deactivate(self):
        print 'Sample plugin deactivated'</pre></div>
<p>
      </p>
<p>
      	As you can see from the example, we simply need to import the ethos python module and
      	inherit from the ethos.Plugin class.  When your plugin is activated, it will be created by
      	the plugin engine on demand and the ethos.Plugin.activate() method is called.
      </p>
<p>
      	The plugin description files look the same as for C except for that you need to set Loader
      	option.  Below is an example plugin description file for the sample python module above.
      </p>
<p>
        </p>
<div class="informalexample"><pre class="programlisting">[Example Plugin]
Name=Sample
Description=A sample python plugin
Module=sample
Loader=python
Authors=John Doe
Copyright=Public Domain
IAage=1</pre></div>
<p>
        You should replace "Example" with the name of the application you are trying to extend.
      </p>
<p>
        Both of these files, sample.example-plugin and sample.py should be placed within the plugin
        directory for your target application.
      </p>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>