how to get partition information of a hard disk with python

Anssi Saari as at
Mon Oct 4 16:33:05 CEST 2010

Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:

> The Linux kernel includes built-in support for something close to two dozen 
> different partition formats, from the common ones like MS-DOS, Solaris, SGI, 
> Ultrix, EFI and BSD on down. Why reinvent parts of that when you can get it 
> all for free?

Because for the common case it's simple and easy and one might learn
something interesting?

But can you really get all that for free, in python? in other words,
is there a python API for all that? The stuff in /proc/partitions
seems rather limited to me, although I have only vanilla partitions on
my computers.

More information about the Python-list mailing list