osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to get partition information of a hard disk with python


Strange.  The OP's message didn't make it here, but I'm seeing
multiple replies

> On Wednesday, September 22, 2010 at 4:01:04 AM UTC+5:30, Hellmut
> Weber wrote:
> > Hi list,
> > I'm looking for a possibility to access the partiton inforamtion
> > of a hard disk of my computer from within a python program.

You don't specify whether your disk has MBR, GPT, or some other
partitioning scheme.  However, at least for MBR, I threw together
this code a while back:

https://mail.python.org/pipermail/python-list/2009-November/559546.html

I imagine something similar could be done in the case of a GPT.

-tkc