how to subscript a module #672
jgriesfeller
started this conversation in
help wanted
Replies: 2 comments
-
try with the getattr built-in function CFG = getattr(foo, "CFG") |
Beta Was this translation helpful? Give feedback.
0 replies
-
Works, thanks for the suggestion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
for my aeroval parallelization effort I would appreciate a little help. As long as this is not solved we all have to stick to the var name CFG for the aeroval config.
The very preliminary parallelization interface is here:
https://github.com/metno/pyaerocom/blob/griesie_fix_663/pyaerocom/tools/aeroval_parallelise.py
To do some the parallelization I have to load the aeroval config file as a module done here:
pyaerocom/pyaerocom/tools/aeroval_parallelise.py
Line 66 in d902f21
Unfortunately modules are not subscript-able, so something like
does not work. In my case that means that the aeroval configuration has to be in a variable with a fixed name (CFG atm). I find that rather inflexible and would like to make that configurable.
I know that this can in principle be done, but I want to focus on the parallelization for now. So if one of you has a solution to the problem, this will be well appreciated.
Beta Was this translation helpful? Give feedback.
All reactions