python as a “batch” script (i.e. run commands from python)

后端 未结 4 1283
花落未央
花落未央 2020-12-30 08:50

I\'m working in a windows environment (my laptop!) and I need a couple of scripts that run other programs, pretty much like a windows batch file.

how can I run a com

4条回答
  •  醉话见心
    2020-12-30 09:15

    I found out that os.system does what I want,

    Thanks for all that tried to help.

    os.system("dir")
    

    runs the command just as if it was run from a batch file

提交回复
热议问题