Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'wed,': 0.03; 'filename': 0.09; '25,': 0.12; 'am,': 0.14; 'subject:file': 0.14; 'wrote:': 0.14; 'angelico': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ha!': 0.16; 'header:In-Reply-To:1': 0.21; 'parse': 0.23; 'received:209.85.161': 0.26; 'message- id:@mail.gmail.com': 0.28; 'appended': 0.30; 'url:library': 0.31; 'to:addr:python-list': 0.33; 'chris': 0.34; 'file': 0.34; 'there': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'url:docs': 0.37; 'url:python': 0.38; 'subject:from': 0.38; 'url:org': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'subject:name': 0.67; 'url:os': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=CcnQAXsnedT5ILnd4mGaq7gvpqBkDLh1A4o4h+IJr74=; b=vTboLMllWgFUoHSlmGCDfAt/Tgi1SN9gVh59YUeat3kUmtkzpiOGY+tLr29DrwpjXk 8QBhQXBQ/ahrH8dsx6iiNCMVCNYJ359tFrYY6E7t2rz2OLla/d1aLBb9tkh0jnbs2sxW lDjGuMdTYRIS1Q5nGmI9QB4uCuZ5gr+zJpVkA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MrVPevBke8a5+f1kLxIQhyLkzbn1K+jTHydVXOyL8tNCjQl1QvzScSZMlqk6h8/qpI tAtaeUu+yin+DFgl8intHuuLY6WGjzBFKLHWA6vRtHscvumY8NBIQeT9FiB9PUV7a/TD 1Q2gwYcEqLi/Kr852W41bAh3Mb7mhWEB3jIS0= MIME-Version: 1.0 In-Reply-To: <09bb028b-7050-4b8e-99b0-722af11918f7@y19g2000yqk.googlegroups.com> References: <6af58349-43d3-4132-ab0a-a072852e6f3a@g12g2000yqd.googlegroups.com> <09bb028b-7050-4b8e-99b0-722af11918f7@y19g2000yqk.googlegroups.com> Date: Wed, 25 May 2011 02:08:16 +1000 Subject: Re: Obtaining a full path name from file From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306253300 news.xs4all.nl 49038 [::ffff:82.94.164.166]:37408 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6149 On Wed, May 25, 2011 at 2:04 AM, RVince wrote: > Ha! You;re right -- but is there a way to get it without the filename > appended at the end? Parse the file name with the os.path functions: http://docs.python.org/library/os.path.html Chris Angelico