prompt for string from standard input?

Anything that doesn't fit elsewhere.
Post Reply
abogaard
Posts: 8
Joined: Mon Feb 05, 2007 4:21 pm
Location: ann arbor, mi

prompt for string from standard input?

Post by abogaard »

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.
ted
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?

Post by ted »

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.
abogaard wrote:I want to dynamically assign folder names for the data files I spit out after simulations.
By "dynamically" do you mean "interactively"?
And by "folder names" do you mean "file names"?
abogaard
Posts: 8
Joined: Mon Feb 05, 2007 4:21 pm
Location: ann arbor, mi

Post by abogaard »

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
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

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()
Post Reply