Your message dated Sat, 12 Sep 2015 15:36:30 +0000
with message-id <[email protected]>
and subject line Bug#692503: fixed in pyparted 3.10.7-1
has caused the Debian Bug report #692503,
regarding provide some simple examples
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
692503: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692503
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-parted
Severity: wishlist

hi,

searching the web for examples on how to use python-parted was not quite
successful, i think the only good resource at the moment is to look at the
anaconda sourcecode. Maybe its possible to provide some simple examples to get
one started. Attached are two small examples, one which shows simple
information about attached devices, another one which lists partitions for a
certain device.

bye,
    - michael
#!/usr/bin/python
# simple example on how to list available devices on system
import parted

devices = parted.getAllDevices();

for device in devices:
    geom = device.hardwareGeometry;
    ssize = device.sectorSize;
    size = (geom[0] * geom[1] * geom[2] * ssize) / 1000 / 1000 / 1000;

    print "Model: %s" %   device.model
    print "Size: %s GB" %  size 
    print "Heads: %s" %  geom[0]
    print "Sectors: %s" %  geom[2]
    print "Sector Size: %s" % ssize; 
#!/usr/bin/python
# list primary partitions for a given device
import parted

device = parted.getDevice("/dev/sda")
disk = parted.Disk(device)


# obj.getLogicalPartitions() for logical
# obj.getExtendedPartition() for extended
primary_partitions = disk.getPrimaryPartitions();

for partition in primary_partitions:
	print "Partition: %s" % partition.path
	print "Size: %s Bytes" % partition.getSize(unit="b")
	try:
		fs = parted.probeFileSystem(partition.geometry)
	except:
		fs = "unknown"
	print "Filesystem: %s" % fs
	print "Start: %s End: %s" % (partition.geometry.start,partition.geometry.end)

--- End Message ---
--- Begin Message ---
Source: pyparted
Source-Version: 3.10.7-1

We believe that the bug you reported is fixed in the latest version of
pyparted, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Herbert Parentes Fortes Neto <[email protected]> (supplier of updated pyparted 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 05 Sep 2015 18:37:24 -0300
Source: pyparted
Binary: python-parted python3-parted python-parted-dbg python3-parted-dbg
Architecture: source amd64
Version: 3.10.7-1
Distribution: unstable
Urgency: medium
Maintainer: Herbert Parentes Fortes Neto <[email protected]>
Changed-By: Herbert Parentes Fortes Neto <[email protected]>
Description:
 python-parted - Python interface for libparted
 python-parted-dbg - Python interface for libparted - Debugging symbols
 python3-parted - Python 3 interface for libparted
 python3-parted-dbg - Python 3 interface for libparted - Debugging symbols
Closes: 692503
Changes:
 pyparted (3.10.7-1) unstable; urgency=medium
 .
   * New upstream release
   * debian/python-parted.docs:
       - the BUGS file was removed by the upstream.
   * debian/python3-parted.docs:
       - the BUGS file was removed by the upstream.
   * debian/example/*:
       - examples for python-parted.(entry added in python-parted.examples)
         Thanks Michael Ablassmeier. (Closes: #692503)
Checksums-Sha1:
 ece5efe6954911bcaf5276372ad1edad0ace6949 2179 pyparted_3.10.7-1.dsc
 1f9f8bb9704d6e859b964365e52197f332749c7a 102683 pyparted_3.10.7.orig.tar.gz
 5fe0c8b042ea8aa069462321e1ccfeac5142d045 5400 pyparted_3.10.7-1.debian.tar.xz
 8abfcfdb4d754f2f4a49da6c103e672396440535 50060 
python-parted-dbg_3.10.7-1_amd64.deb
 73a80dde2a3bfd21598bde305884c0db34e3f1e9 70430 python-parted_3.10.7-1_amd64.deb
 86926bfd58b6eac5687950633a8ea5c6c8b2cf1e 50040 
python3-parted-dbg_3.10.7-1_amd64.deb
 662053edbe4e5d18e8a6c6a37ca5891d09617508 70264 
python3-parted_3.10.7-1_amd64.deb
Checksums-Sha256:
 989397cee007d3f99e22ab197d9f3b4b2d34d1480164f7715b4798f3efc24aa9 2179 
pyparted_3.10.7-1.dsc
 e394d9f4f3e26a603938a85c1e0eb2baf050005bc968764058cfb986fd8b8e35 102683 
pyparted_3.10.7.orig.tar.gz
 c32194beff7e619b268c5c1f011674787abecf02d69d5609a99c6b940bc3a365 5400 
pyparted_3.10.7-1.debian.tar.xz
 dfad448ef801cce9ec4555c896baa69986426a96fe8d6601dde73dfb14e2d149 50060 
python-parted-dbg_3.10.7-1_amd64.deb
 91b6763ef5953c9ce42f49d1bb41c34bd354912f1563b491a93327c9bab0375a 70430 
python-parted_3.10.7-1_amd64.deb
 cf34b8f87b708964e33b6d5f81291dcc297bad5e2e4c623c1b316a4bcdff4e4a 50040 
python3-parted-dbg_3.10.7-1_amd64.deb
 bfe5a81afb3b561a05471a34859b76de944c7ee919a86ab319ea2bdf93a716bc 70264 
python3-parted_3.10.7-1_amd64.deb
Files:
 9b714450d700fbc77f532873a784a1b8 2179 python optional pyparted_3.10.7-1.dsc
 8a11e3e7cda69a61fbd706bd4ceca804 102683 python optional 
pyparted_3.10.7.orig.tar.gz
 676896d9a1a571851d9c9e214361d309 5400 python optional 
pyparted_3.10.7-1.debian.tar.xz
 4eedb45a57d3fccdba1fbe4784e7a4eb 50060 debug extra 
python-parted-dbg_3.10.7-1_amd64.deb
 5296c8090e81f0ec9eee52e7ffb7f186 70430 python optional 
python-parted_3.10.7-1_amd64.deb
 35f9b7b69cec9f64a83a75a3d398bd06 50040 debug extra 
python3-parted-dbg_3.10.7-1_amd64.deb
 5e2b8e6f1f35178d005fca56df1d6585 70264 python optional 
python3-parted_3.10.7-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJV8Dy1AAoJEFUlbyisYGEaYIIQAKnPwfSZVrSduRtvIgsRwahd
bfL9qAVeH26f+Adz26CBs6JwLF5b3ZJ5UQt78LoonyNvY9Tu3egcloiablik8u6C
khxHYoYYrhsslcUSUGnuAUkhWmBAWRoC9v8/lVL+9M8wotDWAAKN2q3Tgs/qSH0b
hd6ehnipvHVR4mT2NwVWj4uoi2R1hnCPLqgPq/uiZCh2QEg8Vy+94ZEdEN23AWBW
WiQkHB3ihbhTu+98LCkA0wnwzNvKFIboxO6+/qQIeNnY9kCHvK3/3DbqAtHwYijL
XC5TWLRI7JlcvO99p8dPa2ryeom6fRq9/cR9pHyOwW5rj3UcUNQVQYcJDKQpOgp9
nj0l+ZFv9w21iliK/U775oCYJu1JDGKZG4WmDpDyz5tlaYsia6VkGMuLZ8o/K1xi
e7odzESquAxrl78aeEwhDgQqzcz4Qjvdeus5lXFbnjXkCkLXlWhaiP2pPO53poxs
OBSyDrZAGNwzMN64oAqARnxxSJVu7xDT7vBBtaHy/Rt03sf5TKe1bzDfrokNdUC/
a1r7lR4kBRmeLQdMZneBYZ+DduCVgNfrb8mohEtrJFQaHttS0wD0hB1XhWDJUmpR
7T17Q9BwtPGiqjTnZkyqzEMzpu0ngqPSOxNx41cd6wF0NNTc+1PH5JCVhAEljTam
ypHQfS6Q3uF45W4ZzJAM
=I1Hp
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to