Newbie Question: Shell-like Scripting in Python?

N D Efford nde at
Wed Oct 2 16:21:23 CEST 2002

Scott Meyers <Usenet at> wrote:
> Another thing I want to do is write short shell-like scripts for my Windows
> machine, e.g., copy and move or rename files whose size fulfills some
> criteria or whose name matches some regexp, etc.  One of the reasons I
> decided to play with Python was that I thought it could do these
> scripting-like things; the first sentence on the back of "Learning Python"
> refers to its suitability for "quick scripts."  However, I haven't seen
> anything in the book's TOC or index on shell-like scripts, and a cursory

Chapter 9 of "Learning Python" has some examples of programs that might
fall into this category.  Also, 2nd edition of "Programming Python"
has loads of detail on building system utilities in Python - with some
particularly good stuff on differences between UNIX and Windows
platforms when it comes to using Python for scripting.

The os module is essential for this kind of application, so time spent
studying its features would certainly not be wasted.


More information about the Python-list mailing list