From 6fd8a8f9bf48562fbbc42f908321b67d436c097e Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sat, 2 Oct 2021 09:49:17 -0500 Subject: python: Open all scripts with utf-8 encoding --- plugins/python/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/python') diff --git a/plugins/python/python.py b/plugins/python/python.py index 7bd327e3..1adcde98 100644 --- a/plugins/python/python.py +++ b/plugins/python/python.py @@ -146,7 +146,7 @@ class Plugin: def loadfile(self, filename): try: self.filename = filename - with open(filename) as f: + with open(filename, encoding='utf-8') as f: data = f.read() compiled = compile_file(data, filename) exec(compiled, self.globals) -- cgit 1.4.1 From 9c7109b57869881660fefeaf98a10b7911118117 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Tue, 11 Jan 2022 21:51:52 +0530 Subject: meson: Fix exported functions for python plugin This fixes loading python plugin in Windows by exporting functions using python.def file. Otherwise, hexchat_plugin_init symbol error is shown. --- plugins/python/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/python') diff --git a/plugins/python/meson.build b/plugins/python/meson.build index 5fd7ec2f..1e9b41ad 100644 --- a/plugins/python/meson.build +++ b/plugins/python/meson.build @@ -28,4 +28,5 @@ shared_module('python', python3_source, install: true, install_dir: plugindir, name_prefix: '', + vs_module_defs: 'python.def' ) -- cgit 1.4.1