X-Received: by 10.224.72.199 with SMTP id n7mr1982594qaj.5.1363275491744; Thu, 14 Mar 2013 08:38:11 -0700 (PDT) X-Received: by 10.49.24.13 with SMTP id q13mr249990qef.33.1363275491717; Thu, 14 Mar 2013 08:38:11 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t2no2751300qal.0!news-out.google.com!k8ni188qas.0!nntp.google.com!dd2no661650qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Thu, 14 Mar 2013 08:38:11 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.72.47.176; posting-account=XtVbbAkAAACKUwKnhT-sDRR6-3PQ0CMA NNTP-Posting-Host: 75.72.47.176 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Generating Filenames from Feeds From: Chuck Injection-Date: Thu, 14 Mar 2013 15:38:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:41232 HI all, I am trying to write a podcast catcher for fun, and I am trying to come up = with a way to generate a destination filename to use in the function urlret= rieve(url, destination). I would like the destination filename to end in = a .mp3 extension. =20 My first attempts were parsing out the and stripping the whitespa= ce characters, and joining with os.path.join. I haven't been able to make = that work for some reason. Whenever I put the .mp3 in the os.path.join I g= et syntax errors. I am wondering if there is a better way? I was doing something like os.path.join('C:\\Users\\Me\\Music\\Podcasts\\',= pubdate.mp3), where pubdate has been parsed and stripped of whitespace. I= keep getting an error around the .mp3. Any ideas? Thanks!! Chuck