On May 23, 12:20 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 22 May 2008 11:03:48 -0700 (PDT), [EMAIL PROTECTED] declaimed the
> following in comp.lang.python:
>
> > Ah, well, I didn't get any other responses, but here's what I've done:
>
> Apparently the direct email from my
On May 21, 11:41 am, [EMAIL PROTECTED] wrote:
> On May 21, 11:13 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 2008-05-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > I'd appreciate any help. I've got a list of files in a directory, and
> > > I'd like to iterate through that l
On May 21, 11:13 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> On 2008-05-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I'd appreciate any help. I've got a list of files in a directory, and
> > I'd like to iterate through that list and process each one. Rather
> > than do that serially,
On 2008-05-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'd appreciate any help. I've got a list of files in a directory, and
> I'd like to iterate through that list and process each one. Rather
> than do that serially, I was thinking I should start five threads and
> process five files at
All,
I'd appreciate any help. I've got a list of files in a directory, and
I'd like to iterate through that list and process each one. Rather
than do that serially, I was thinking I should start five threads and
process five files at a time.
Is this a good idea? I picked the number five at ran
"Doran, Harold" <[EMAIL PROTECTED]> wrote:
> If these files followed a naming convention such as 1.txt and 2.txt I
> can easily see how these could be parsed consecutively in a loop.
> However, they are not and so is it possible to modify this code such
> that I can tell python to parse all .txt f
> new_file = open('filename.txt', 'w')
> params = open('eggs.txt', 'r')
> do all the python stuff here
> new_file.close()
>
> If these files followed a naming convention such as 1.txt and 2.txt I
> can easily see how these could be parsed consecutively in a loop.
> However, they are not and
Doran, Harold wrote:
> Say I have multiple text files in a single directory, for illustration
> they are called "spam.txt" and "eggs.txt". All of these text files are
> organized in exactly the same way. I have written a program that parses
> each file one at a time. In other words, I need to run m
Funny,
I'm just doing exactly this:
import os
def main():
dataFolder = 'data/'
fileList = os.listdir(dataFolder)
for file in fileList:
inFile = open(dataFolder + file, 'r')
print 'read inFile & do something useful here'
Clear as an... egg?
Say I have multiple text files in a single directory, for illustration
they are called "spam.txt" and "eggs.txt". All of these text files are
organized in exactly the same way. I have written a program that parses
each file one at a time. In other words, I need to run my program each
time I want to
10 matches
Mail list logo