- Expose the script filename in the Python module environment 'mod_env'

instead of the config_file structure which includes the linked list
  of scripts in a multi Python module setup; fixes #79.
This commit is contained in:
George Thessalonikefs
2023-10-16 15:47:18 +02:00
parent 07149f576a
commit 63a5280f8f
12 changed files with 38 additions and 18 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
def init(id, cfg):
log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script))
log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, mod_env['script']))
return True
def init_standard(id, env):
log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script))
log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, mod_env['script']))
return True
def deinit(id):