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


Groups > comp.lang.python > #92032

Re: Find in ipython3

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'cc:addr:python-list': 0.10; 'python': 0.11; '18:13,': 0.16; 'files).': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'wrote:': 0.16; 'byte': 0.18; '>>>': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'cc:no real name:2**0': 0.23; '2015': 0.23; 'cheers,': 0.24; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'cest': 0.29; 'once.': 0.29; 'way?': 0.29; "skip:' 10": 0.30; 'field,': 0.31; 'implement': 0.32; 'knows': 0.32; 'received:com.au': 0.33; 'file': 0.34; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'conference': 0.37; 'instead': 0.38; 'easily': 0.39; 'forget': 0.60; 'content- disposition:inline': 0.60; 'cameron': 0.66; 'thursday': 0.66; 'box,': 0.67; 'intelligent': 0.76; 'counts': 0.81; 'cecil': 0.84; 'points,': 0.84; 'schreef': 0.84; 'westerhof': 0.84
Date Thu, 4 Jun 2015 15:43:39 +1000
From Cameron Simpson <cs@zip.com.au>
To Cecil Westerhof <Cecil@decebal.nl>
Cc python-list@python.org
Subject Re: Find in ipython3
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
In-Reply-To <87vbf4giu6.fsf@Equus.decebal.nl>
User-Agent Mutt/1.5.23 (2014-03-12)
References <87vbf4giu6.fsf@Equus.decebal.nl>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=eZjABOwH c=1 sm=1 tr=0 a=rgDbx50tNA2z7xLXQOoruw==:117 a=rgDbx50tNA2z7xLXQOoruw==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=J0QyKEt1u0cA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=XAFQembCKUMA:10 a=rO0KX0Mmg2N9p48OPVgA:9 a=CjuIK1q_8ugA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.145.1433396629.13271.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433396629 news.xs4all.nl 2852 [2001:888:2000:d::a6]:41475
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92032

Show key headers only | View raw


On 04Jun2015 07:09, Cecil Westerhof <Cecil@decebal.nl> wrote:
>Op Thursday 4 Jun 2015 04:54 CEST schreef Cameron Simpson:
>
>> On 02Jun2015 18:13, Cecil Westerhof <Cecil@decebal.nl> wrote:
>>> I am thinking about using ipython3 instead of bash. When I want to
>>> find a file I can do the following:
>>> !find ~ -iname '*python*.pdf'
>>> but is there a python way?
>>
>> That succinct? Not out of the box, but something can easily be built
>> on top of the os.walk() function.
>
>OK, I will write it. And something to implement du.
>Thanks.

Have fun.

For added points, do not forget that du knows about hardlinks and only counts a 
file once.  And that it counts the blocks field, not the byte size (think: 
sparse files).

Cheers,
Cameron Simpson <cs@zip.com.au>

Thermochromic ink is the Pet Rock ink of the New Millennium.
- overhead by WIRED at the Intelligent Printing conference Oct2006

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


Thread

Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-02 18:13 +0200
  Re: Find in ipython3 Cameron Simpson <cs@zip.com.au> - 2015-06-04 12:54 +1000
    Re: Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-04 07:09 +0200
      Re: Find in ipython3 Cameron Simpson <cs@zip.com.au> - 2015-06-04 15:43 +1000
      Re: Find in ipython3 Grant Edwards <invalid@invalid.invalid> - 2015-06-04 14:27 +0000
        Re: Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-04 17:12 +0200
          Re: Find in ipython3 Michael Torrie <torriem@gmail.com> - 2015-06-04 13:11 -0600
  Re: Find in ipython3 Michael Torrie <torriem@gmail.com> - 2015-06-04 13:09 -0600
  Re: Find in ipython3 Tim Chase <python.list@tim.thechases.com> - 2015-06-04 14:17 -0500
  Re: Find in ipython3 random832@fastmail.us - 2015-06-04 16:13 -0400
    Re: Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-05 09:17 +0200
      Re: Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-06 11:57 +0200
        Re: Find in ipython3 Laura Creighton <lac@openend.se> - 2015-06-06 13:07 +0200
          Re: Find in ipython3 Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 08:20 +0200
            Re: Find in ipython3 Cameron Simpson <cs@zip.com.au> - 2015-06-07 17:38 +1000
            Re: Find in ipython3 Laura Creighton <lac@openend.se> - 2015-06-07 11:33 +0200
              Re: Find in ipython3 Steven D'Aprano <steve@pearwood.info> - 2015-06-07 23:16 +1000
            Re: Find in ipython3 Peter Otten <__peter__@web.de> - 2015-06-07 12:27 +0200
            Re: Find in ipython3 Laura Creighton <lac@openend.se> - 2015-06-07 15:01 +0200
            Re: Find in ipython3 Chris Angelico <rosuav@gmail.com> - 2015-06-07 22:13 +1000

csiph-web