script files with python (instead of tcsh/bash)?

Esmail ebonak at hotmail.com
Mon Mar 23 14:58:41 CET 2009


Hi Gabriel,

Gabriel Genellina wrote:
> En Sun, 22 Mar 2009 11:05:22 -0300, MRAB <google at mrabarnett.plus.com> 
> escribió:
>> Esmail wrote:
>>> Nick Craig-Wood wrote:
>>>> Esmail <ebonak at hotmail.com> wrote:
<..>
>>>  As a replacement for grep I would use the re module and its methods?
> 
> Perhaps; but strings have methods too (`"abc" in line` is easier to 
> read, and faster, than the corresponding r.e.)

I'm  a big fan of readability (which is one reason I am attracted
to Python) .. thanks for pointing out the alternative, good to have
options.

>>> The other things I need to do consist of moving files, manipulating file
>>> names and piping outputs of one command to the next, so I'm digging into
>>> the documentation as much as I can.
>>>
>> The 'os' and 'shutil' modules.
> 
> And for executing external commands with piping, I'd add the subprocess 
> module.

I will take a look at the subprocess module, thanks!

Esmail




More information about the Python-list mailing list