Re: [Tutor] Avoiding the use of files to store intermediate results

2006-04-25 Thread Bob Gailer
Andre Roberge wrote: > On 4/25/06, Hugo González Monteverde <[EMAIL PROTECTED]> wrote: > >> Remember duck typing. An object just needs to look like a file in order >> to be used like one. >> >> Guido's time machine has already forseen your problem. Take a look at >> the StringIO module. It allo

Re: [Tutor] Avoiding the use of files to store intermediate results

2006-04-25 Thread Andre Roberge
On 4/25/06, Hugo González Monteverde <[EMAIL PROTECTED]> wrote: > Remember duck typing. An object just needs to look like a file in order > to be used like one. > > Guido's time machine has already forseen your problem. Take a look at > the StringIO module. It allows you to use a string where you

Re: [Tutor] Avoiding the use of files to store intermediate results

2006-04-24 Thread Hugo González Monteverde
Remember duck typing. An object just needs to look like a file in order to be used like one. Guido's time machine has already forseen your problem. Take a look at the StringIO module. It allows you to use a string where you would normally pass a file object. Hope that helps, Hugo > ## >

[Tutor] Avoiding the use of files to store intermediate results

2006-04-24 Thread Andre Roberge
I wrote a small wxPython based app to test code snippets. (google for "python lightning compiler" if you want to see the full code). In the basic mode, I redirect the standard input and output and execute the code taken from the editor window so that the result appears in the output window. Here