Batch commands on Windows

Moosebumps crap at
Fri Jan 23 07:56:03 CET 2004

So, after reading some messages about os.system, and looking at the popen
stuff and trying it a bit, I still have not found a way to keep a command
window open for several commands (on Windows 2000/XP), while seeing the
normal output in a command window.  All I want to do is do what a batch file
does, but I want to actually have functions and associative arrays and all
the other niceties of python.

What's the deal with that?  I thought Python started out as a scripting
language.  And that seems like the most basic thing that a scripting
language should do.  I just want to list the commands, not deal with
capturing the output and redirecting it and all that.  It's not just because
I'm too lazy, it's because most of my co-workers don't know Python and I
want to make the transition easier and sell them on it.  This seems like an
enormous deficiency.  Does anyone know if this can be done?

If not, that's a point for perl, *gasp* : )  Which we _were_ using, but
which I object to for reasons I won't go into.

I have noticed this tendency for really good software to be deficient in
some obvious area.  Python has amazed me in many respects, but every so
often I encounter something like this which is pretty disappointing.  And
yes I have read PEP 324, but it doesn't seem to make mention anything like
this.  Another example is Perforce, which is absolutely outstanding for 99%
of things, but then you encounter some glaring hole.  Most software is just
mediocre all around.


More information about the Python-list mailing list