Dear, I'm encountering a small but annoying problem.It might be caused be caused by bad programming but still it deserves a solution. Normally when you add the "-" (dash) at the end of a nrniv command, neuron is not quitting after the last command. Now i want to obtain the same result when loading a simulation from python. As replied in another post of this forum, the "nrniv -python <pythonfile>" doesn't work at my system, so i cannot add the dash. when executing the file as "python <py_file_with_nrn_statements>" it works. However (due to the aforementioned bad programming), when i hit the stop button in the runcontrol, the whole simulation ends and neuron ends. Is there a way to load a python file, run it from python and not quit neuron after pressing the stop button?
Thanks, Ben
the `-' in a prompt
Moderator: hines
Re: the `-' in a prompt
nrniv -python file.py
does not exit but stops with the >>> prompt.
I do not know how to do the same with
python file.py
The first line should work. Can you point me to the post that
mentions the problem with the first line?
does not exit but stops with the >>> prompt.
I do not know how to do the same with
python file.py
The first line should work. Can you point me to the post that
mentions the problem with the first line?
Re: the `-' in a prompt
You can use ipython:
Launch it
and at the prompt:
it will execute the file and give you the prompt
Launch it
Code: Select all
ipython
Code: Select all
In [1]: run file.py
-
- Posts: 14
- Joined: Tue May 24, 2005 3:56 am
- Location: CNRS, Gif sur Yvette, France
- Contact:
Re: the `-' in a prompt
Code: Select all
python -i file.py