Re: [Tutor] StringIO and dictionaries

2007-04-30 Thread Bob Gailer
Necmettin Begiter wrote: > I want to run an external python script inside my script. So here is what I > came up with: > > Print codename for testing purposes. > Define an empty dictionary. > Read the file. > Do StringIO assignments and run the code. > Get the outputs and append them to the dictio

[Tutor] StringIO and dictionaries

2007-04-30 Thread Necmettin Begiter
I want to run an external python script inside my script. So here is what I came up with: Print codename for testing purposes. Define an empty dictionary. Read the file. Do StringIO assignments and run the code. Get the outputs and append them to the dictionary. Print the outputs for testing purp

Re: [Tutor] StringIO

2006-05-23 Thread Kent Johnson
kakada wrote: > Actually, what I want is creating a kind of file that is just located in > memory not file system. > I want to have a filename for my convert(inputFileName, outputFileName) > How can I get filename? > doing: > fin.name() is impossible! Rewrite convert so it takes file-like objects

Re: [Tutor] StringIO

2006-05-22 Thread kakada
Danny Yoo wrote: >> I want to use the module StringIO as read and write strings as files, >> I looked into document but cannot understand. Could anyone give me a >> simple example? >> >> something like: >> from StringIO import * >> fin = StringIO("abc") >> . >> How can I used fin? > > 'fin' is

Re: [Tutor] StringIO

2006-05-22 Thread Danny Yoo
> I want to use the module StringIO as read and write strings as files, I > looked into document but cannot understand. Could anyone give me a > simple example? > > something like: > from StringIO import * > fin = StringIO("abc") > . > How can I used fin? 'fin' is a file-like object at this

[Tutor] StringIO

2006-05-22 Thread kakada
Hello list, I want to use the module StringIO as read and write strings as files, I looked into document but cannot understand. Could anyone give me a simple example? something like: from StringIO import * fin = StringIO("abc") . How can I used fin? Thanks, da __