format discs.

Gerhard Häring gh at ghaering.de
Wed Jul 9 12:13:14 CEST 2003


Flanagan wrote:
> hello to all 
> 
> somebody can say to me whereupon I modulate of python I can format 
> discs.

You probably mean creating a filesystem on a partition. In Windoze-speak 
that's stupidly called "to format".

The easiest solution for Windows is to just call format.exe with the 
appropriate parameters. This can be done in various ways from Pythno, 
the simplest one being os.system. Other options are the commands and 
popen2 modules, depending on wether you need to read the output of 
format.exe.

Similarly on *nix, call mkfs.

-- Gerhard





More information about the Python-list mailing list