Python Script for Running a Python Program over Different Files inthe Directory
Spam at ivonet.nl
Sat Mar 13 19:13:56 CET 2004
look at the execfile( filename[, globals[, locals]])
command in de manpages
or the following
execl( path, arg0, arg1, ...)
execle( path, arg0, arg1, ..., env)
execlp( file, arg0, arg1, ...)
execlpe( file, arg0, arg1, ..., env)
execv( path, args)
execve( path, args, env)
execvp( file, args)
execvpe( file, args, env)
Use the other examples to iterate
"Shalen chhabra" <shalen_itbhu at hotmail.com> wrote in message
news:mailman.351.1079166133.19534.python-list at python.org...
> Can anyone give me a snippet for running a python program over all the
> in the directory.
> For ex: I have ten files in a directory and I want to run a python
> against all of these files, I wish to do the same using another python
> instead of running each of these files one by one, which would be
> giving the argv of each file every single time.
> This can be easily done using a shell script but I just wanted to have a
> flavour of python for this.
> Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1!
> (Limited-time Offer)
More information about the Python-list