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


Groups > comp.lang.python > #104373

Re: Question

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: Question
Date Tue, 8 Mar 2016 18:27:45 -0700
Lines 45
Message-ID <mailman.63.1457486912.15725.python-list@python.org> (permalink)
References <CAPZK=NPMN1JRHCNivWojp0QvQQpoh02cHbxn1VOhLnE8fg4idg@mail.gmail.com> <mailman.30.1457369898.10335.python-list@python.org> <slrnndrh4r.19u.jon+usenet@wintry.unequivocal.co.uk> <nbkgh7$8q0$1@dont-email.me> <slrnndrjj8.19u.jon+usenet@wintry.unequivocal.co.uk> <mailman.44.1457378999.10335.python-list@python.org> <slrnndsbjk.19u.jon+usenet@wintry.unequivocal.co.uk> <mailman.52.1457457599.15725.python-list@python.org> <56df65a1$0$1596$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqzod5kZ+p34=gh8fkTpP8tho_bZwLnsqyaHw78E-22Pw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de DI50/1MjMxdlU42uAxAPRgIFprzFm6PeAKuiAxZDtkqg==
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'needed,': 0.05; 'subject:Question': 0.05; '*not*': 0.07; 'bash': 0.07; 'emulates': 0.07; 'seemed': 0.07; 'agree,': 0.09; 'complaining': 0.09; 'enormous': 0.09; 'git': 0.09; 'python': 0.10; 'wed,': 0.15; '"windows': 0.16; '(note,': 0.16; '(which,': 0.16; '2016': 0.16; 'available;': 0.16; 'bash,': 0.16; 'conceivably': 0.16; 'emulator': 0.16; 'posix': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'shells': 0.16; 'think?': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'script.': 0.18; 'shell': 0.18; 'runs': 0.18; '>>>': 0.20; 'windows': 0.20; 'work,': 0.21; '(the': 0.22; 'am,': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'command': 0.26; 'installed': 0.26; '(which': 0.26; 'linux': 0.26; 'chris': 0.26; 'skip:" 20': 0.26; 'separate': 0.27; 'message-id:@mail.gmail.com': 0.27; 'idea': 0.28; 'looks': 0.29; 'windows,': 0.29; 'environment': 0.29; "i'm": 0.30; 'work.': 0.30; "can't": 0.32; '[1]': 0.32; 'though,': 0.32; 'run': 0.33; 'problem': 0.33; 'closely': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'surprised': 0.33; 'tue,': 0.34; 'handle': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'world,': 0.35; 'could': 0.35; 'activate': 0.35; 'displays': 0.35; 'installing': 0.35; 'expected': 0.35; 'but': 0.36; 'should': 0.36; 'instead': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'operating': 0.37; 'received:209.85.213': 0.37; 'difference': 0.38; "won't": 0.38; 'received:209': 0.38; 'stuff': 0.38; 'sure': 0.39; 'url:en': 0.39; 'does': 0.39; 'unable': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'provide': 0.61; 'default': 0.61; 'no.': 0.62; 'skip:n 10': 0.62; 'within': 0.64; 'between': 0.65; 'mar': 0.65; 'worth': 0.67; 'activation.': 0.84; 'presumably': 0.84; 'terrible': 0.84; 'to:name:python': 0.84; 'url:book': 0.84; 'url:v2': 0.84; 'ports': 0.93
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; bh=5c0sjrSIVv8a7qcCf0HjNqXGsSue6mSqHoxd1o6bnNE=; b=iAwiaIeyqxRJ2NcNWNHuI8DcMhqiFKC/CdgcSN/6HHgzj62IhJdYglJVeedkKID30N y0JygGY+du18nl9kH5FnpXkZ/NB7KjObXIFIXLEk4QDQi/l9gLL9ZtmRWEiSp3fDbCrk eJZsdRnhtHKGme2qo2H5P3Q2UcToSmkGh4GWsYQB0ufLGwgqSmQDPYP9FdkQ5vKPCdSG 8bFvEBsYLdwdFQjRUzxQbLZyrPYiXR6baqYf5f/P+cywq+9GKMyvEmgIAMbrm8fvvG7e f0EBi6DF+dCLFG9MfrZgCOM811oxZLbxJdQHs6GRTPcQjeow528mmReBWn2njtoOXXnu yX+g==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=5c0sjrSIVv8a7qcCf0HjNqXGsSue6mSqHoxd1o6bnNE=; b=AEM2bHVYZgcS4Hs17bZjJbJRA2LdMb0x+SA3GDTGoPFCCvHRXAPEualzwkWQlSKf67 BT+PDEKV4kOn77I2pNXHwKAZavUOs1fw5vucy6npy2D9zUcqsTnyitD6G02MeJF2rj0i pjkLk4mE83uoi+7XFfwhnLmOYi55o+Aa2vygzYnjVAeaFQUKM1NFBjlEtwAUFYp8OXnJ k3I8kLMfMUYxLkJDEvc0QVvY1OD//HUOyfNonsc2T/WuweOoZsbhPQq0wlfkVXn56VBA NGimUgcIutq8rbxFovalztz4PxrfkmSqYqDSoV+PvYVOxvZSUJu4EX8qy1pPOyULqcGv vYDw==
X-Gm-Message-State AD7BkJLBgLitxiO22sCyDCK81kFtlpoTTRXvz1pQ0kKlt5Lq8wM7BfbSfuqxmnX//aLVYhUOWeryZURldAs++g==
X-Received by 10.50.3.42 with SMTP id 10mr22265522igz.85.1457486904552; Tue, 08 Mar 2016 17:28:24 -0800 (PST)
In-Reply-To <CAPTjJmqzod5kZ+p34=gh8fkTpP8tho_bZwLnsqyaHw78E-22Pw@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
Xref csiph.com comp.lang.python:104373

Show key headers only | View raw


On Tue, Mar 8, 2016 at 5:13 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Mar 9, 2016 at 10:52 AM, Steven D'Aprano <steve@pearwood.info> wrote:
>>> Well, running bash on Windows is decidedly non-standard. This is like
>>> installing a Python package on a Linux system and then complaining
>>> that it won't run under wine. I don't think that Python should be
>>> expected to provide an activate script for all possible shells the
>>> user might conceivably want to use.
>>
>> Not "all possible shells", no. But it's not unreasonable for it to handle
>> the single most popular operating system environment in the world, Windows,
>> don't you think?
>
> I'm not sure that the issue is "Windows can't use venv", but "Windows
> with Git Bash can't use venv". Windows has a number of shells
> available; the default one is pretty terrible but does kinda work, and
> then there's PowerShell, and ports of other shells like bash. Cygwin
> provides its own shell (which I think is bash), and I'm not sure if
> that's the same as Git Bash installs. And then there's the difference
> between the shell (the command interpreter) and the, for want of a
> better name, terminal emulator (the thing that displays stuff on the
> screen).
>
> Working purely within cmd.exe and the default terminal emulator, I was
> able to "py -m venv env" and then "env\scripts\activate" (note, *not*
> env/bin/activate which is what I'm used to - no idea why). It seemed
> to work.
>
> Working instead in Git Bash, though, leaves me unable to activate,
> because there is no bash script for venv activation. Hence, the
> problem is "supporting all possible shells" (which is an enormous
> challenge), rather than "supporting one of the three most popular
> operating systems" (which, I agree, is well worth doing).

It looks like the shell environment that comes with Git for Windows is
actually Windows Powershell [1], so presumably the activate.ps1 script
that's already provided by venv is what's needed, not a bash script.

Git Bash is apparently separate and runs under MinGW, which in my
limited experience could charitably be described as "semi-functional".
Admittedly, it's been a long while since the last time I tried to use
it. Cygwin is much better, and it emulates a POSIX platform so closely
that I wouldn't be surprised if a Python running under Cygwin simply
installed the bash venv script to begin with.

[1] https://git-scm.com/book/en/v2/Git-in-Other-Environments-Git-in-Powershell

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


Thread

Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 09:57 -0700
  Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-07 18:09 +0000
    Re: Question mm0fmf <none@invalid.com> - 2016-03-07 18:18 +0000
      Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-07 18:51 +0000
        Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 12:29 -0700
          Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 01:41 +0000
            Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-07 17:59 -0800
              Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 10:24 +0000
                Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-08 08:47 -0800
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 16:53 +0000
            Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 10:19 -0700
              Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 17:56 +0000
                Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 11:08 -0700
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 18:08 +0000
              Re: Question Steven D'Aprano <steve@pearwood.info> - 2016-03-09 10:52 +1100
                Re: Question Chris Angelico <rosuav@gmail.com> - 2016-03-09 11:13 +1100
                Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 18:27 -0700
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-09 12:28 +0000
                Re: Question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-09 23:01 -0500
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-10 11:44 +0000
                Re: Question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-10 08:37 -0500
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-09 12:52 +0000
        Re: Question Chris Angelico <rosuav@gmail.com> - 2016-03-08 06:47 +1100
          Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 01:33 +0000
        Re: Question Andrew Farrell <amfarrell@mit.edu> - 2016-03-07 14:00 -0600
        Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-07 11:04 -0800
    Re: Question Chris Warrick <kwpolska@gmail.com> - 2016-03-07 19:22 +0100
    Re: Question Random832 <random832@fastmail.com> - 2016-03-07 13:26 -0500

csiph-web