Re: Writing to function arguments during execution

2009-10-14 Thread Dave Angel
John O'Hagan wrote: Thanks, sockets are the way to go for this and surprisingly easy to use once you get your head around them. I tried Rhodri's suggested approach but for now I used the original terminal for both starting the program and entering new options (still via raw_input) and a new t

Re: Writing to function arguments during execution

2009-10-13 Thread John O'Hagan
On Mon, 12 Oct 2009, Rhodri James wrote: > On Sun, 11 Oct 2009 14:18:25 +0100, John O'Hagan > > wrote: > > Now I can change the output of the "work" function while it's running via > > raw_input(). However it's very crude, not least because the terminal > > echo of > > the new options is interspe

Re: Writing to function arguments during execution

2009-10-11 Thread Rhodri James
On Sun, 11 Oct 2009 14:18:25 +0100, John O'Hagan wrote: Now I can change the output of the "work" function while it's running via raw_input(). However it's very crude, not least because the terminal echo of the new options is interspersed with the output of the program. In future I hope t

Writing to function arguments during execution

2009-10-11 Thread John O'Hagan
I'm writing a (music-generating) program incorporating a generator function which takes dictionaries as its arguments. I want to be able to change the values of the arguments while the program is running. I have it working as in this toy example (python 2.5): from sys import argv from threadin