Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66767

Re: Cross-platform way to get default directory for binary files like console scripts?

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 <oscar.j.benjamin@gmail.com>
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 <le57ph$t7g$1@ger.gmane.org>
References <405ad1dc-691e-4c71-adfd-c19c599ad555@googlegroups.com> <mailman.7188.1392909800.18130.python-list@python.org> <991f7bda-7313-4192-9e56-410a454b79d8@googlegroups.com> <le57ph$t7g$1@ger.gmane.org>
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
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 <ned@nedbatchelder.com>
Content-Type text/plain; charset=ISO-8859-1
Cc Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.7193.1392911764.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On 20 February 2014 15:42, Ned Batchelder <ned@nedbatchelder.com> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Cross-platform way to get default directory for binary files like console scripts? Piotr Dobrogost <p@google-groups-2014.dobrogost.net> - 2014-02-20 06:27 -0800
  Re: Cross-platform way to get default directory for binary files like console scripts? Ned Batchelder <ned@nedbatchelder.com> - 2014-02-20 10:11 -0500
  Re: Cross-platform way to get default directory for binary files like console scripts? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-02-20 15:22 +0000
    Re: Cross-platform way to get default directory for binary files like console scripts? Piotr Dobrogost <p@google-groups-2014.dobrogost.net> - 2014-02-20 07:34 -0800
      Re: Cross-platform way to get default directory for binary files like console scripts? Ned Batchelder <ned@nedbatchelder.com> - 2014-02-20 10:42 -0500
        Re: Cross-platform way to get default directory for binary files like console scripts? Piotr Dobrogost <p@google-groups-2014.dobrogost.net> - 2014-02-20 07:55 -0800
      Re: Cross-platform way to get default directory for binary files like console scripts? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-02-20 15:44 +0000
      Re: Cross-platform way to get default directory for binary files like console scripts? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-02-20 15:55 +0000
      Re: Cross-platform way to get default directory for binary files like console scripts? Ned Batchelder <ned@nedbatchelder.com> - 2014-02-20 11:26 -0500
      Re: Cross-platform way to get default directory for binary files like console scripts? Piotr Dobrogost <p@google-groups-2014.dobrogost.net> - 2014-02-21 06:12 -0800

csiph-web