Using the package in maverick-proposed, I was able to import the parted
module and perform basic queries about my disk. Looks good:
ebro...@tracey:~$ sudo python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import parted
>>> dev = parted.getDevice('/dev/sda')
>>> print dev
parted.Device instance --
model: ATA ST9250410AS path: /dev/sda type: 1
sectorSize: 512 physicalSectorSize: 512
length: 488397168 openCount: 0 readOnly: False
externalMode: False dirty: False bootDirty: False
host: 1 did: 0 busy: True
hardwareGeometry: (30401, 255, 63) biosGeometry: (30401, 255, 63)
PedDevice: <_ped.Device object at 0x7f5f9afeb440>
>>> disk = parted.Disk(dev)
>>> print disk
parted.Disk instance --
type: msdos primaryPartitionCount: 2
lastPartitionNumber: 5 maxPrimaryPartitionCount: 4
partitions: [<parted.partition.Partition object at 0x7f5f9b00a050>,
<parted.partition.Partition object at 0x7f5f9b00a390>,
<parted.partition.Partition object at 0x7f5f9b00a510>]
device: <parted.device.Device object at 0x7f5f9b000b50>
PedDisk: <_ped.Disk object at 0x7f5f9b0ab5f0>
>>> print disk.partitions[0]
parted.Partition instance --
disk: <parted.disk.Disk object at 0x7f5f9b000e10> fileSystem:
<parted.filesystem.FileSystem object at 0x7f5f9b00a290>
number: 1 path: /dev/sda1 type: 0
name: None active: True busy: True
geometry: <parted.geometry.Geometry object at 0x7f5f9b00a090> PedPartition:
<_ped.Partition object at 0x7f5f9aff4d70>
>>>
** Tags added: verification-done
** Tags removed: verification-needed
--
raise ValueError:" Invalid flag provided." when import parted module in pyhon
https://bugs.launchpad.net/bugs/669931
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs