[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

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 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] How to foreach over a dynamic number of levels

2009-02-12 Thread Alexander Daychilde (Gmail)
First, thank you VERY much for your help! That's amazingly much easier than I thought it would be... I was considering looping through and generating nested for loops, then exec'ing the whole mess.. UGH, and security risk, to boot... Couple of questions: > Make a list containing all the steps: >

[Tutor] Iterating over letters or arbitrary symbols like they were numbers...

2009-03-18 Thread Alexander Daychilde (Gmail)
If there's an easy way to do this, I'd like to have a pointer to it (i.e. what functions would deal with this - not wanting my code written for me...) Right now, I have written code to generate a list of strings that happen to be a range of numbers. (The fact that they're strings is actually desir

[Tutor] Accessing a list inside a class...

2009-04-09 Thread Alexander Daychilde (Gmail)
I feel like I'm missing something simple, but I have now spent hours googling for an answer. I think I must not be searching for the right terms, or else this is something I'm not supposed to be doing - but it seems straightforward to me. Here's my test code (condensed from the actual much long