How to make an os.system call, without the pop up of the dos-box???

wheineman wheinemanNOwhSPAM at uconect.net.invalid
Fri Aug 4 14:01:58 EDT 2000


"Peter Arwanitis" <arwanitis at iabg.de> wrote:
>Hi there,
>
>I try to call some system-calls under a windows-environment, but
I'm not
>able to make this in "invisible" mode...
>
>there are calls like:
>os.system(r'rmdir /S /Q C:\arwa\dev\') #clear dir-structure
recursive
>
>or
>
>os.system(r'copy ..\AccessDB_ORIG\OrigPTC.mdb
>...\AccessDB_ORIG\PTC-000526.mdb')
>
>stuff like that :)
>
>any hints?
>
>thanks a lot
>(=PA=)
>
>
>
>
>

Must be win32. You can always call win32api.ShellExecute if
you've got Mark Hammond's pythonwin installed. The parameters are
in order:
  the handle of the parent window (can be None)
  the filename of the executable as a string,
  the parameters to be passed to the executable as a string,
  the initial directory to run in as a string,
  the show command

Use win32con.SW_HIDE or 0 to run silent.


-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com




More information about the Python-list mailing list