From: Idan Kamara Date: Wed, 24 Oct 2012 08:49:17 +0000 (+0200) Subject: collectd-python.conf(5): capitalize Python X-Git-Tag: collectd-5.0.5~1^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3c7b3ddef30b7cd457f2ca2fd9535cced829874b;p=collectd.git collectd-python.conf(5): capitalize Python Signed-off-by: Florian Forster --- diff --git a/src/collectd-python.pod b/src/collectd-python.pod index 5fd1f4f9..071ef454 100644 --- a/src/collectd-python.pod +++ b/src/collectd-python.pod @@ -37,7 +37,7 @@ 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 (see L) and provides a lot more functionality, too. -At least python I is required. +At least Python I is required. =head1 CONFIGURATION @@ -47,9 +47,9 @@ At least python I is required. Loads the Python plugin I. Unlike most other LoadPlugin lines, this one should be a block containing the line "Globals true". This will cause collectd -to export the name of all objects in the python interpreter for all plugins to +to export the name of all objects in the Python interpreter for all plugins to see. If you don't do this or your platform does not support it, the embedded -interpreter will start anyway but you won't be able to load certain python +interpreter will start anyway but you won't be able to load certain Python modules, e.g. "time". =item B I @@ -68,15 +68,15 @@ use multiple B lines to add more than one directory. =item B I -If a python script throws an exception it will be logged by collectd with the +If a Python script throws an exception it will be logged by collectd with the name of the exception and the message. If you set this option to true it will also log the full stacktrace just like the default output of an interactive -python interpreter. This should probably be set to false most of the time but +Python interpreter. This should probably be set to false most of the time but is very useful for development and debugging of new modules. =item B I -This option will cause the module to launch an interactive python interpreter +This option will cause the module to launch an interactive Python interpreter that reads from and writes to the terminal. Note that collectd will terminate right after starting up if you try to run it as a daemon while this option is enabled to make sure to start collectd with the B<-f> option. @@ -86,7 +86,7 @@ have to do it manually. Be sure to read the help text of the module, it can be used as a reference guide during coding. This interactive session will behave slightly differently from a daemonized -collectd script as well as from a normal python interpreter: +collectd script as well as from a normal Python interpreter: =over 4 @@ -107,22 +107,22 @@ To quit collectd send I (press I at the beginning of a new line). =item -B<3.> collectd handles I. This means that python won't be able to +B<3.> collectd handles I. This means that Python won't be able to determine the return code of spawned processes with system(), popen() and -subprocess. This will result in python not using external programs like less +subprocess. This will result in Python not using external programs like less to display help texts. You can override this behavior with the B environment variable, e.g. I before starting collectd. -Depending on your version of python this might or might not result in an +Depending on your version of Python this might or might not result in an B exception which can be ignored. -If you really need to spawn new processes from python you can register an init +If you really need to spawn new processes from Python you can register an init callback and reset the action for SIGCHLD to the default behavior. Please note that this I break the exec plugin. Do not even load the exec plugin if you intend to do this! There is an example script located in B to do this. If you import this from I SIGCHLD will be handled -normally and spawning processes from python will work as intended. +normally and spawning processes from Python will work as intended. =back @@ -139,22 +139,22 @@ The I identifies the callback. =head1 STRINGS -There are a lot of places where strings are send from collectd to python and -from python to collectd. How exactly this works depends on wheather byte or -unicode strings or python2 or python3 are used. +There are a lot of places where strings are send from collectd to Python and +from Python to collectd. How exactly this works depends on wheather byte or +unicode strings or Python2 or Python3 are used. Python2 has I, which is just bytes, and I. Python3 has I, which is a unicode object, and I. -When passing strings from python to collectd all of these object are supported +When passing strings from Python to collectd all of these object are supported in all places, however I should be used if possible. These strings must not contain a NUL byte. Ignoring this will result in a I exception. If a byte string was used it will be used as is by collectd. If a unicode object was used it will be encoded using the default encoding (see above). If -this is not possible python will raise a I exception. +this is not possible Python will raise a I exception. -Wenn passing strings from collectd to python the behavior depends on the -python version used. Python2 will always receive a I object. Python3 will +Wenn passing strings from collectd to Python the behavior depends on the +Python version used. Python2 will always receive a I object. Python3 will usually receive a I object as well, however the original string will be decoded to unicode using the default encoding. If this fails because the string is not a valid sequence for this encoding a I object will be @@ -673,7 +673,7 @@ L. =item -collectd is heavily multi-threaded. Each collectd thread accessing the python +collectd is heavily multi-threaded. Each collectd thread accessing the Python plugin will be mapped to a Python interpreter thread. Any such thread will be created and destroyed transparently and on-the-fly. @@ -703,7 +703,7 @@ dispatched by the python plugin after upgrades. =item -Not all aspects of the collectd API are accessible from python. This includes +Not all aspects of the collectd API are accessible from Python. This includes but is not limited to filters and data sets. =back