Thanks for the answer and help.
Cheers :)
Peter Hansen wrote:
> cantabile wrote:
>
>> Hi, Peter
>> Thanks for the reply. I'll check popen().
>> But you said I should not rely on fdisk... Why ? And should I prefer
>> sfdisk ? Why ?
>
>
> I was under the impression that fdisk was older and more
cantabile wrote:
> Hi, Peter
> Thanks for the reply. I'll check popen().
> But you said I should not rely on fdisk... Why ? And should I prefer
> sfdisk ? Why ?
I was under the impression that fdisk was older and more primitive, but
a quick check shows I'm probably not only wrong, but had it back
Hi, Peter
Thanks for the reply. I'll check popen().
But you said I should not rely on fdisk... Why ? And should I prefer
sfdisk ? Why ?
Peter Hansen wrote:
> cantabile wrote:
>
>> Hi, I'd like to get drives and partitions (and their size too) with
>> python under Linux. So far, I thought of read
Hi, Jeff
Great help : this works like a charm. I think I can customize it to read
from sfdisk. Do you agree with Peter Hansen (post below) about fdisk ?
Jeff Epler wrote:
> Using /proc/partitions is probably preferable because any user can read
> it, not just people who can be trusted with read a
cantabile wrote:
> Hi, I'd like to get drives and partitions (and their size too) with
> python under Linux. So far, I thought of reading /proc/partitions but
> maybe i could use fdsik also ?
> How would I do that in python ?
Somebody else posted a very similar question quite recently. A Google
Using /proc/partitions is probably preferable because any user can read
it, not just people who can be trusted with read access to drives, and
because the format of /proc/partitions is probably simpler and more
stable over time.
That said, what you do is
import commands
fdisk_output = comm
Hi, I'd like to get drives and partitions (and their size too) with
python under Linux. So far, I thought of reading /proc/partitions but
maybe i could use fdsik also ?
How would I do that in python ?
Thanks for your help (newbie here :) )
--
http://mail.python.org/mailman/listinfo/python-list