Spawning Cmd Window via Subprocess
bigboss1964 at gmail.com
Fri Oct 16 23:26:28 CEST 2009
On Oct 16, 8:15 pm, D <dmcclo... at gmail.com> wrote:
> I would like to be able to spawn a new CMD window (specifing size,
> color and placement of the window), and write to it separately.
> Specifically, I have a backup program that displays each file backed
> up in the main window, and I would like to spawn and continually
> update a second CMD window that will display the current status (i.e.
> number of files backed up, amount of data backed up). Also, I only
> want to display the update messages, don't want to display any command
> prompts. I'm thinking I should be able to do this using subprocess,
> but I haven't been able to find out how. Any help would be greatly
you'll likely want to fiddle with subprocess.Popen with the arguments
set to suitable values to invoke a cmd window and establish pipes for
communication; see the documentation. If that doesn't work, it would
probably be time to muck with the Windows API.
More information about the Python-list