|
From: kevin p. <kp...@me...> - 2010-03-28 19:03:44
|
On Mar 29, 2010, at 3:52 AM, Andreas Mock wrote: > -----Ursprüngliche Nachricht----- > > there was a reason for showing you my version with every command line argument being one item in python list. > As soon as you work with shell=True you get all evil of handling shell special characters. And it you want > to do a generic os.walk you NEVER know how the files are named. Ah... I never considered that. Thanks for the additional explanation. That idea hadn't even occurred to me. > INHO the whole thing has an advantage: > You can prepare the constant caling options once and only change the command line arguments > which change (e.g. the filenames). You don't need to do string manipulation for every > invocation, just changing one or two elements of a list. Thanks. That surely is another advantage. I am trying to figure out a naming scheme now to put this and the os walk thing together. I imagine i need some string manipulation that allows me to take the input file name and some how automatically generate a unique but related output file name. I am not quite sure how to do that but that is more of a pure python problem and i already pushed my luck on this list with this query. But .. if i could hash out a nice example of how to do this it might be worth putting a script on the site for future sox users who would like to call sox within python. Possibly. cheers, -kp PS. What does INHO mean? |