What if I want to include a single batch command that isn't already in a file in python?
for instance:
REN *.TXT *.BAT
Could I put that in a python file somehow?
What if I want to include a single batch command that isn't already in a file in python? for instance:
Could I put that in a python file somehow? |
||||
The "old school" answer was to use
Or (maybe)
But now, as noticed by Ashwini Chaudhary, the "recommended" replacement for If
If it is an external command:
|
|||||||||||
|
A example use subprocess for execute a command of Linux from Python:
|
|||
|
I created a
|
|||
|
.txt
files to.bat
? – Ashwini Chaudhary Jun 15 at 7:07