On Sun, Aug 1, 2010 at 17:38, Hugo Arts <hugo.yo...@gmail.com> wrote: > On Mon, Aug 2, 2010 at 2:26 AM, Richard D. Moores <rdmoo...@gmail.com> wrote: >> >> Well, I'd like to try. Could you give me, say, an outline of what >> might be a good way? Actually, before I changed to the error catching, >> I tried to break it up into a bunch of small functions. But they got >> all tangled up with some functions returning the calling of others, >> that I couldn't get them straightened out. Also, some were required to >> have such a long string of arguments I couldn't get them all on one >> line. >> > > For starters, the code recreating both your files is almost exactly > the same, so you can easily turn that into one function and call it > twice. I see two necessary arguments, the path and the data you're > dumping in. See if you can work that one out. > > The file saving code at the end is another one that can be easily made > into one function and called twice. If you get those two pieces done > you should be in good shape.
OK, here's my attempt: <http://tutoree7.pastebin.com/3YNJLkYc>. Better? Dick _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor