From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: how having the basename of a file or directory Date: Wed, 02 Feb 2011 01:26:56 +0900 Message-ID: <87sjw73elr.fsf@uwakimon.sk.tsukuba.ac.jp> References: <8739o9ilfs.fsf@gmail.com> <877hdl4grd.fsf@uwakimon.sk.tsukuba.ac.jp> <87y661h2ju.fsf@gmail.com> <8739o83r6u.fsf@uwakimon.sk.tsukuba.ac.jp> <87tygnwyt8.fsf@red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296578361 7809 80.91.229.12 (1 Feb 2011 16:39:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2011 16:39:21 +0000 (UTC) Cc: emacs-devel@gnu.org, Thierry Volpiatto To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 01 17:39:14 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PkJFr-0005aK-VY for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 17:39:14 +0100 Original-Received: from localhost ([127.0.0.1]:51033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkJDk-0006bj-M3 for ged-emacs-devel@m.gmane.org; Tue, 01 Feb 2011 11:36:48 -0500 Original-Received: from [140.186.70.92] (port=59176 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkJD1-0004P1-Db for emacs-devel@gnu.org; Tue, 01 Feb 2011 11:36:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkJCQ-0001sI-LG for emacs-devel@gnu.org; Tue, 01 Feb 2011 11:35:27 -0500 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:53804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkJCQ-0001s6-Au for emacs-devel@gnu.org; Tue, 01 Feb 2011 11:35:26 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id 514D8970679; Wed, 2 Feb 2011 01:35:24 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id E616B1A3007; Wed, 2 Feb 2011 01:26:56 +0900 (JST) In-Reply-To: <87tygnwyt8.fsf@red-bean.com> X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135405 Archived-At: Karl Fogel writes: > "Stephen J. Turnbull" writes: > > > or creating a basename function > > > >Un-Pythonic. But then, this isn't Python, so I guess it's OK. ;-) > > $ python > Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) > >>> import os.path > >>> os.path.basename("/home/kfogel/README") > 'README' > >>> quit() > $ You know what I mean. "Not every three-line function needs to be a built-in." AFAIK Python doesn't have an equivalent to file-name-directory; you need to write that yourself.