Open johnnybubonic opened 4 years ago
Worth noting that the following works and sets the name:
Python 3.7.4 (default, Jul 16 2019, 07:12:58)
[GCC 9.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import parted
>>> dev = parted.getDevice('/dev/vdb')
>>> disk = parted.Disk(dev)
>>> part = disk.partitions[0]
>>> p = part.getPedPartition()
>>> p.set_name('foo')
but I presume this is not desired, as it seems PedPartitions are intended for internal library-use only.
That's true. Anything with Ped in the name is mapping down to libparted. The whole point of pyparted is to have a slightly higher level API for working with libparted.
Things like getPedPartion() exist because I need to pass those around among libparted calls. I'll look in to this one more tomorrow when I get a chance. Thanks.
This seems to break, at least in python 3.7. I get
AttributeError: can't set attribute
: