collectd-python(5): Fix some formatting.
[collectd.git] / src / collectd-python.pod
index c07ebf9..f6c42eb 100644 (file)
@@ -27,6 +27,8 @@ for collectd in Python. This is a lot more efficient than executing a
 Python-script every time you want to read a value with the C<exec plugin> (see
 L<collectd-exec(5)>) and provides a lot more functionality, too.
 
+Currently only python2 is supported and at least version 2.3 is required.
+
 =head1 CONFIGURATION
 
 =over 4
@@ -40,7 +42,14 @@ see. If you don't do this or your platform does not support it, the embeded
 interpreter will start anywa but you won't be able to load certain python
 modules, e.g. "time".
 
-=item B<MudulePath> I<Name>
+=item B<Encoding> I<Name>
+
+The default encoding for unicode objects you pass to collectd. If you obmit
+this option it will default to B<ascii> on python2 and B<utf-8> on python3.
+This is hardcoded in python and will ignore everything else, including your
+locale.
+
+=item B<ModulePath> I<Name>
 
 Appends I<Name> to B<sys.path>. You won't be able to import any scripts you
 wrote unless they are located in one of the directuries in this list. Please
@@ -375,22 +384,32 @@ The following functions provide the C-interface to Python-modules.
 There are eight different register functions to get callback for eight
 different events. With one exception all of them are called as shown above.
 
+=over 4
+
+=item
+
 I<callback> is a callable object that will be called every time the event is
-        triggered.
+triggered.
+
+=item
+
 I<data> is an optional object that will be passed back to the callback function
-        every time it is called. If you obmit this parameter no object is
-        passed back to your callback, not even None.
+every time it is called. If you obmit this parameter no object is passed back
+to your callback, not even None.
+
+=item
+
 I<name> is an optional identifier for this callback. The default name is
-        B<python>.I<module>. I<module> is taken from the B<__module__>
-        attribute of your callback function.
-        Every callback needs a unique identifier, so if you want to register
-        the same callback multiple time in the same module you need to specify
-        a name here. Otherwise it's save to ignore this parameter
-I<identifier> is the full identifier assigned to this callback.
+B<python>.I<module>. I<module> is taken from the B<__module__> attribute of
+your callback function. Every callback needs a unique identifier, so if you
+want to register the same callback multiple time in the same module you need to
+specify a name here. Otherwise it's save to ignore this parameter I<identifier>
+is the full identifier assigned to this callback.
+
+=back
 
-These functions are called in the various stages of the daemon (see the
-section "WRITING YOUR OWN PLUGINS" above) and are passed the following
-arguments:
+These functions are called in the various stages of the daemon (see the section
+L<"WRITING YOUR OWN PLUGINS"> above) and are passed the following arguments:
 
 =over 4
 
@@ -497,7 +516,7 @@ To register those functions with collectd:
   collectd.register_read(read);
   collectd.register_write(write);
 
-See the section "CLASSES" above for a complete documentation of the data
+See the section L<"CLASSES"> above for a complete documentation of the data
 types used by the read, write and match functions.
 
 =head1 NOTES