Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread daychilde
: > self.fh.close : > : > Which doesn't show where the vars come from, but I am closing the : file : > first. : : Actually, no, it doesn't. You forgot the () which are needed to : actually _call_ the close method on the last line. : :self.fh.close : : is an expression which evaluate

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread Emile van Sebille
On 7/10/2009 10:24 AM daychi...@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 rea

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread Steve Willoughby
On Fri, Jul 10, 2009 at 12:22:24PM -0500, daychi...@gmail.com wrote: > 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 t

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread daychilde
: 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 .flush() or .close(

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread Bill Campbell
On Fri, Jul 10, 2009, daychi...@gmail.com wrote: >I'm working on a program that calls another program recursively - this other >program reads in ini file and processes it; my program creates a number of >slightly different ini files and calls the other program for each one. > >I can successfully ge

Re: [Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread Steve Willoughby
On Fri, Jul 10, 2009 at 12:00:11PM -0500, daychi...@gmail.com wrote: > I'm working on a program that calls another program recursively - this other Actually it sounds like you're calling it iteratively, not recursively. > I can successfully generate the ini file. The problem is that the other > p

[Tutor] os.system and/or subprocess.call problem...

2009-07-10 Thread daychilde
I'm working on a program that calls another program recursively - this other program reads in ini file and processes it; my program creates a number of slightly different ini files and calls the other program for each one. I can successfully generate the ini file. The problem is that the other pro