Hi there,
I'm very new to python, the problem I need to solve is whats the "best/
simplest/cleanest" way to read in multiple files (ascii), do stuff to
them, and write them out(ascii).
--
import os
filePath = ('O:/spam/eggs/')
for file in os.listdir(file Path): #straight from docs
# iterate the function through all the files in the directory
# write results to separate files <- this is where I'm mostly
stuck.
--
For clarity's sake, the file naming conventions for the files I'm
reading from are file.1.txt -file.nth.txt
It's been a long day, i'm at my wits end, so I apologize in advance if
I'm not making much sense here.
syntax would also be great if you can share some recipes.
Thanks in advance.
h.
I'm very new to python, the problem I need to solve is whats the "best/
simplest/cleanest" way to read in multiple files (ascii), do stuff to
them, and write them out(ascii).
--
import os
filePath = ('O:/spam/eggs/')
for file in os.listdir(file Path): #straight from docs
# iterate the function through all the files in the directory
# write results to separate files <- this is where I'm mostly
stuck.
--
For clarity's sake, the file naming conventions for the files I'm
reading from are file.1.txt -file.nth.txt
It's been a long day, i'm at my wits end, so I apologize in advance if
I'm not making much sense here.
syntax would also be great if you can share some recipes.
Thanks in advance.
h.
Comment