lazyblorg icon indicating copy to clipboard operation
lazyblorg copied to clipboard

Switch import of config.py from import to exec

Open novoid opened this issue 4 years ago • 1 comments

So far, lazyblorg.py is using import to read the configuration file. This might be changed to exec() for some reasons mentioned in https://lobste.rs/s/qyhvhc/your_configs_suck_try_real_programming#c_0btczk

novoid avatar Apr 06 '20 16:04 novoid

Example: https://github.com/arp242/battray/blob/master/battray/init.py

So far, I don't understand all the code here with args:

def source_default():
    exec(open(self.default_config, 'r').read(), args)

args.update({'source_default': source_default})
exec(open(self.configfile, 'r').read(), args)

novoid avatar Oct 04 '20 09:10 novoid