Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'python': 0.11; '2.7.2': 0.16; 'ah,': 0.16; 'attributes.': 0.16; 'benjamin': 0.16; 'none.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:default': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'subject:like': 0.24; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'forgot': 0.30; 'sets': 0.30; 'skip:( 20': 0.30; 'code': 0.31; '4.0': 0.31; 'compatible': 0.32; 'thanks!': 0.32; 'skip:d 20': 0.34; 'subject:?': 0.36; 'apple': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'advanced': 0.63; 'more': 0.64; 'here': 0.66; 'subject:get': 0.81; '4.2.1': 0.84; 'batchelder': 0.84; 'good!': 0.84; 'oscar': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Cross-platform way to get default directory for binary files like console scripts? Date: Thu, 20 Feb 2014 11:26:31 -0500 References: <405ad1dc-691e-4c71-adfd-c19c599ad555@googlegroups.com> <991f7bda-7313-4192-9e56-410a454b79d8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 18.189.35.65 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392913610 news.xs4all.nl 2898 [2001:888:2000:d::a6]:41591 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66771 On 2/20/14 10:55 AM, Oscar Benjamin wrote: > On 20 February 2014 15:42, Ned Batchelder wrote: >> >> As roundabout and advanced as that code is, it doesn't give the right answer >> for me. It returns None. On my Mac, after activating a virtualenv: >> >> Python 2.7.2 (default, Oct 11 2012, 20:14:37) >> [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on >> darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> from distutils.command.install import install >> >>> from distutils.dist import Distribution >> >>> c = install(Distribution()) > > You forgot to call c.finalize_options() here which actually sets all > of these attributes. > Ah, good! Thanks! -- Ned Batchelder, http://nedbatchelder.com