[Tutor] os.system and/or subprocess.call problem...
Emile van Sebille
emile at fenx.com
Fri Jul 10 19:31:27 CEST 2009
On 7/10/2009 10:24 AM daychilde at gmail.com said...
> : Actually it sounds like you're calling it iteratively, not recursively.
>
> :blush: Indeed.
>
> : From what you write in here, my first thought is that the ini file
> : isn't being flushed out to disk before the subprocess starts up and
> : tries to read it.
> :
> : Are you either calling <file>.flush() or <file>.close() or something
> : equivalent BEFORE starting the subprocess?
>
> self.filename = 'bsf.ini'
> self.fullpath = self.thispath + self.filename
> self.fh = open(self.fullpath, 'w')
> self.fh.write(self.bsf_ini)
> self.fh.close
>
> Which doesn't show where the vars come from, but I am closing the file
> first.
Are you? If it reads as you've pasted it doesn't. I think you'll want
self.fh.close()
Emile
More information about the Tutor
mailing list