Partitioning and formatting a USB drive using Python 2.7 -
is there way partition usb drive multiple times , format each partition different type using python 2.7.x?
edit: using windows 7 operating system
as said in comments can use python subprocess
windows command line tools. formatting can done using format
( running windows shell commands python <- can use diskpart
)
for partitioning can use diskpart
tool in combination batch file. disadvantage have save batch file on computer
with following can invoke batch file python
from subprocess import popen p = popen("batch.bat", cwd=r"c:\path\to\batchfolder") stdout, stderr = p.communicate()
Comments
Post a Comment