To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.
Pyeval: Difference between revisions
Jump to navigation
Jump to search
DarthGandalf (talk | contribs) No edit summary |
DarthGandalf (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Core Module}} | {{Core Module}} | ||
This module allows you to evaluate python code. You need [[modpython]] installed and loaded to use it. | This module allows you to evaluate python code. You need [[modpython]] installed and loaded to use it. Pyeval is mostly useful when you are writing some other ZNC module using [[modpython]], and are playing around with ZNC APIs. | ||
When you put a > at the start of a line, it will be replaced by four spaces. This allows you to indent code. Here is an example: | When you put a > at the start of a line, it will be replaced by four spaces. This allows you to indent code. Here is an example: |
Latest revision as of 21:36, 5 August 2019
This module is a part of ZNC. This module is shipped with ZNC by default. If you have the right "LoadMod" you can activate it with /znc LoadMod pyeval The code for this module can be found here. |
This module allows you to evaluate python code. You need modpython installed and loaded to use it. Pyeval is mostly useful when you are writing some other ZNC module using modpython, and are playing around with ZNC APIs.
When you put a > at the start of a line, it will be replaced by four spaces. This allows you to indent code. Here is an example:
def test(): >module.PutModule("Hello World!") <
You can get this module's source code here
Variables
- znc - The znc python module
- module - The loaded pyeval instance
- user - The user which pyeval is loaded as
- client - The current client
Arguments
This user module takes no arguments.
Read loading modules to learn more about loading modules.