Is it possible to run nrnivmodl from python?
Posted: Fri Nov 22, 2019 9:38 am
I'm making a package manager for NEURON called Glia, have a look here https://pypi.org/project/nrn-glia/.
I'd like a platform independent way of compiling a set of folders, similar to how `nrnivmodl folder1 folder2 folder3` would work. Can I somehow import this from the neuron package and run in the Python environment or should I fiddle with shell, subprocesses and stdin/stdout pipes?
Some questions in case I'd have to use subprocesses and rely on the operating system:
* On Windows is there a way to compile mod files from outside the bash shell, from the standard cmd? Using the standard windows installer, will there be any PATH or env vars that point me to the neuron installation so that I could locate the files I need to run to execute the compilation?
* On Linux it seems more straightforward: after installation `nrnivmodl` seems to be immediatly accessible to call
Any other pitfalls I would have to look out for for platform-independent automatic compilation of mod files?
I have managed so far to: create a packager that creates ready to upload packages (astrocyte) of mod files and a package manager that when imported checks whether the collection of installed packages changed and whether we'd have to recompile a new .dll/.so. The part that is missing is actually compiling that dll/so from Python
It would be the last piece of the puzzle to have a platform independent easy-to-use package-based name-collision avoiding manager of NEURON assets.
I'd like a platform independent way of compiling a set of folders, similar to how `nrnivmodl folder1 folder2 folder3` would work. Can I somehow import this from the neuron package and run in the Python environment or should I fiddle with shell, subprocesses and stdin/stdout pipes?
Some questions in case I'd have to use subprocesses and rely on the operating system:
* On Windows is there a way to compile mod files from outside the bash shell, from the standard cmd? Using the standard windows installer, will there be any PATH or env vars that point me to the neuron installation so that I could locate the files I need to run to execute the compilation?
* On Linux it seems more straightforward: after installation `nrnivmodl` seems to be immediatly accessible to call
Any other pitfalls I would have to look out for for platform-independent automatic compilation of mod files?
I have managed so far to: create a packager that creates ready to upload packages (astrocyte) of mod files and a package manager that when imported checks whether the collection of installed packages changed and whether we'd have to recompile a new .dll/.so. The part that is missing is actually compiling that dll/so from Python
It would be the last piece of the puzzle to have a platform independent easy-to-use package-based name-collision avoiding manager of NEURON assets.