Re: (noob alert) why doesn't this work?

2005-03-22 Thread Stephen Thorne
On Tue, 22 Mar 2005 12:10:50 +0100, Bouke Woudstra <[EMAIL PROTECTED]> wrote: > for flac in flacfiles: > cmd = 'metaflac --export-tags=- "%s"' % flac > for line in os.popen(cmd).readlines(): > if 'Artist

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Bengt Richter
On Tue, 22 Mar 2005 09:21:49 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Bouke Woudstra wrote: >> It turned out that some flac files have tags like Artist=artistname and >> others >> have artist=artistname. Therefore it couldn't find the artist! So now I just >> look for 'rtist=' wh

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Scott David Daniels
Bouke Woudstra wrote: It turned out that some flac files have tags like Artist=artistname and others have artist=artistname. Therefore it couldn't find the artist! So now I just look for 'rtist=' which works great. You might want try using something like this: wanted = set('artist album date

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Bouke Woudstra
Thanks for all suggestions. Your first point I knew, but was too lazy to type it. It made no difference for the test files had all tags. Knowing that it was not a asynchrous thing helped me a lot though. There had to be something wrong with the command line for metaflac. It turned out that som

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Diez B. Roggisch
> > The error thrown is: UnboundLocalError: local variable 'title' referenced > before assignment That should be pretty obvious: The UnboundLocalError comes up when you try to access a variable that hasn't been assigned a value before. E.g try this in an interactive python session: foo = "hello"

Re: (noob alert) why doesn't this work?

2005-03-22 Thread Simon Brunning
On Tue, 22 Mar 2005 12:10:50 +0100, Bouke Woudstra <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a bit stuck with this python script. It's aim is to encode all flac files > to wav and then to mp3. The only problem I have is to preserve the tags. The > code works when there's just one flac file in a dir