Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:files': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7.2': 0.16; 'attributes.': 0.16; 'cc:name:python list': 0.16; 'none.': 0.16; 'subject: \n ': 0.16; 'subject:default': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'subject:like': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; "doesn't": 0.30; 'forgot': 0.30; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; 'code': 0.31; '4.0': 0.31; 'compatible': 0.32; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'subject:?': 0.36; 'apple': 0.38; 'advanced': 0.63; 'more': 0.64; 'here': 0.66; 'subject:get': 0.81; '4.2.1': 0.84; 'batchelder': 0.84; 'oscar': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7ogbiAPdBLFBdTdm5ymmor6T8HBESSAY8epR/otMGnM=; b=XSGrOD2MFV1Ior2M9s+RKEKVxvuJQbXIWZE3ybcwL6ndW4njVD5ieP/B4yrlrwR2F8 UFPAISsYnH3oxG9Xj5sEFXbDb8SMRfVIjLvgjE/jybHiTVnXma/W/ft1qqpoKppRxFyK fTjjNTe7YQZ/4hr38MfB82gx3xc4bk8K+1Fwie/RAZWpGMxRrrn9pJnB/XL+YtYQrNGp TYgkLrGgJgEONcg8WKIXfCzmFOf+Y1Y3iA/ngRmGdCo7IiqrepBq40/Dp2sjrMvLaEYO OEIxVzupXMv7ISWUGVBRvZNOOhO7E3FUmdfXY/3hSac0GCmZNsxvc/Eaw+Q31F9Z/GQt Vc1A== X-Received: by 10.52.84.102 with SMTP id x6mr1154443vdy.49.1392911761970; Thu, 20 Feb 2014 07:56:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <405ad1dc-691e-4c71-adfd-c19c599ad555@googlegroups.com> <991f7bda-7313-4192-9e56-410a454b79d8@googlegroups.com> From: Oscar Benjamin Date: Thu, 20 Feb 2014 15:55:41 +0000 Subject: Re: Cross-platform way to get default directory for binary files like console scripts? To: Ned Batchelder Content-Type: text/plain; charset=ISO-8859-1 Cc: Python List 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392911764 news.xs4all.nl 2883 [2001:888:2000:d::a6]:49255 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66767 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. > >>> c.install_scripts > >>> c.install_scripts is None > True Oscar