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


Groups > comp.lang.python > #20612

Re: Python as a default shell, replacement of bash, sh, cmd ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'python.': 0.04; 'subject:Python': 0.05; 'received:verizon.net': 0.07; 'stuff,': 0.07; 'terry': 0.07; 'python': 0.08; 'bash': 0.09; 'merging': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'syntax.': 0.09; 'am,': 0.12; 'reedy': 0.16; 'wrote:': 0.18; 'jan': 0.19; 'header:In-Reply-To:1': 0.22; 'itself,': 0.23; 'shell': 0.24; 'subject: ?': 0.24; 'mode': 0.25; 'modify': 0.25; 'module': 0.26; 'import': 0.27; 'environment.': 0.30; 'exiting': 0.30; 'invoke': 0.30; 'syntax,': 0.30; 'idea': 0.32; 'header:User- Agent:1': 0.33; 'header:X-Complaints-To:1': 0.34; 'closely': 0.34; 'latter': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'two': 0.36; 'received:org': 0.36; 'example,': 0.37; 'convenient': 0.37; 'but': 0.37; 'similar': 0.37; 'another': 0.37; 'either': 0.37; 'cannot': 0.39; 'might': 0.40; 'to:addr:python.org': 0.40; 'making': 0.64; 'special': 0.66
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Python as a default shell, replacement of bash, sh, cmd ?
Date Sun, 19 Feb 2012 13:28:38 -0500
References <24942665.31.1329591482717.JavaMail.geo-discussion-forums@pbux2> <12644c63-c7df-49fb-b3e9-16029057cee3@sk8g2000pbc.googlegroups.com> <6736331.2480.1329639496391.JavaMail.geo-discussion-forums@pbbox6>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-74-109-121-73.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
In-Reply-To <6736331.2480.1329639496391.JavaMail.geo-discussion-forums@pbbox6>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5953.1329676141.27778.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1329676141 news.xs4all.nl 6868 [2001:888:2000:d::a6]:37463
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20612

Show key headers only | View raw


On 2/19/2012 3:18 AM, SherjilOzair wrote:
> Well, if not modify python itself, I was thinking of making another
> shell, which borrows a lot from python, something like merging bash
> and python. such that I can do `cd ~/Desktop/dev` and `for i in

'cd xxx' cannot work because that is not python syntax. "cd('xxx')" 
could. Right now, one can import os and do shell stuff, but not so 
convinient for interactive use. 'os.chdir' is not so convenient as 'cd'. 
Two possible options, either of which might exist on PyPI:

1. a shell module used as 'from bashshell import *' which would have 
functions closely mimicking, in this example, bash

2. a shell module used as 'from bashshell import bash; bash()' which 
would invoke an sub-interactive mode like help() that would allow 'cd 
xxx' and similar syntax, which still affecting the global environment.
The latter would trade the inconvenience of '()'s for the inconvenience 
of entering and exiting a special submode.

I have not used IPYthon so I have no idea how close it gets to either of 
these.

-- 
Terry Jan Reedy

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


Thread

Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-18 10:58 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Jabba Laci <jabba.laci@gmail.com> - 2012-02-18 20:21 +0100
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-18 13:46 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-18 13:46 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Bryan <bryanjugglercryptographer@yahoo.com> - 2012-02-18 20:05 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-19 00:18 -0800
      Re: Python as a default shell, replacement of bash, sh, cmd ? Terry Reedy <tjreedy@udel.edu> - 2012-02-19 13:28 -0500
    Re: Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-19 00:16 -0800
      Re: Python as a default shell, replacement of bash, sh, cmd ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-19 08:49 +0000
      Re: Python as a default shell, replacement of bash, sh, cmd ? "Kyle T. Jones" <onexpadREMOVE@EVOMERyahoodotyouknow.com> - 2012-02-21 20:28 -0600
        Re: Python as a default shell, replacement of bash, sh, cmd ? Grant Edwards <invalid@invalid.invalid> - 2012-02-22 15:31 +0000
          Re: Python as a default shell, replacement of bash, sh, cmd ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-22 22:15 +0000
  Re: Python as a default shell, replacement of bash, sh, cmd ? Michael Torrie <torriem@gmail.com> - 2012-02-19 17:23 -0700
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-19 22:15 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-19 22:15 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Serhiy Storchaka <storchaka@gmail.com> - 2012-02-21 11:15 +0200

csiph-web