I want to dynamically assign folder names for the data files I spit out after simulations.
So far I have used xred to set numerical parameters, but I would like something analogous for strings and havent found it... when used in my hoc file, getstr defaults to the loaded file and tried to grab the next line of code from the file rather than breaking for my input.
Thanks much,
Andrew
Also, I thoroughly enjoyed meeting everyone last week and will surely cross paths again.
prompt for string from standard input?
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: prompt for string from standard input?
The NEURON course is always a lot of work for all who are involved, but also
a lot of fun because everybody learns new (and often useful) stuff.
And by "folder names" do you mean "file names"?
a lot of fun because everybody learns new (and often useful) stuff.
By "dynamically" do you mean "interactively"?abogaard wrote:I want to dynamically assign folder names for the data files I spit out after simulations.
And by "folder names" do you mean "file names"?
I already dynamically assign file names based on changing parameters during the run, but I hope to interactively create folders before each run. I realize I could just hardwire a strfoldername in there and manually assign it before I hit run, but theres a programmer part of me thats frustrated and stubborn to figure this out.
Andrew
Andrew
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Have you considered using the TextEditor class?
http://www.neuron.yale.edu/neuron/stati ... tedit.html
Or perhaps you might find inspiration in lib/hoc/stdrun.hoc's
proc save_ses_nrnmainmenu()
or
proc change_working_dir()
http://www.neuron.yale.edu/neuron/stati ... tedit.html
Or perhaps you might find inspiration in lib/hoc/stdrun.hoc's
proc save_ses_nrnmainmenu()
or
proc change_working_dir()