how to hide the MS-dos window of an outside dos program in python

In my python program, I use spawnl and os.system to call an outside dos .exe program. When that dos program is called and running, a MS-Dos window appears briefly and then disappears as the dos program ends. My question is: is there any way to suppress the appearance of that Dos Window? I am using py2exe to distribuite the program.
Who is Participating?
Instead of this, for example:


you can do this:


which will run the command invisibly, reading and discarding its output.
bergelAuthor Commented:
Excellent.  Thanks, this solved my problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.