Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92086
| Date | 2015-06-04 13:09 -0600 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Find in ipython3 |
| References | <87y4k2hyvf.fsf@Equus.decebal.nl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.173.1433444951.13271.python-list@python.org> (permalink) |
On 06/02/2015 10:13 AM, Cecil Westerhof 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? No more than there is a bash-native way of doing find. Bash scripts use a myriad of external, utility programs like find, cut, awk, sed, etc to do heavy lifting. The same things work just fine in iPython. Why do you need a "python way?" Besides, Python isn't really a shell scripting language, and ipython seems more like a hack to me. Bash, Zsh, etc are all better suited to actual shell scripting because their syntaxs integrate the spawning external processes and building pipes in a nice way (if you can call bash syntax nice). That's not to say Python can't be used for system programming. It certainly can. And it can replace perl easily at fast text processing. Generator expressions are the single most powerful tool in this. Why not use Python for what it's good for and say pipe the results of find into your python script? Reinventing find poorly isn't going to buy you anything.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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