searching for multiple strings in one pass
ghost_man at my-deja.com
ghost_man at my-deja.com
Thu Jul 20 13:36:41 EDT 2000
I am stuck on a problem here where I am using python to grab a large
amount of info from a database. I am then using python to pass command
line parameters to some program based on file names. I only want to
run on certain file types such as files ending with .hpp or .cpp or
whatever. The problem is how can I do searches for multiple file types
in one pass rather than having to run through the entire list several
times? Here is a sample of how I am doing it now....
hpp = string.find(newline,".hpp")
if hpp > 0:
k = (creating argumenthere)
os.system (k)
How do I check for several file types in one pass?
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list