dcantrell / pyparted

Python bindings for GNU parted (libparted)
GNU General Public License v2.0
85 stars 42 forks source link

Is there a documentation? #63

Closed papoteur-mga closed 4 years ago

papoteur-mga commented 5 years ago

Hello, I look for a documentation of this module and find nothing. Have I missed something? For example, I saw usage of parted.PARTITION_NORMAL as type in parted.Partition in a program, but is there other partition type which can be used? I'm not alone: https://stackoverflow.com/questions/54398587/how-to-use-pyparted-to-inspect-and-change-partition-table

dcantrell commented 5 years ago

Apologies for the lacking documentation, that is definitely something that I should fix. Can you explain what you are trying to do and I can walk you through the API?

papoteur-mga commented 5 years ago

Hello, I use parted in this small utility which format a device like USB key in one partition: http://gitweb.mageia.org/software/isodumper/tree/lib/raw_format.py the user can choose Fat32, NTFS and ext4. I just added exfat, but wonder if type=parted.PARTITION_NORMAL in line 106 is OK for this case.

papoteur-mga commented 5 years ago

Hello, I use parted in this small utility which format a device like USB key in one partition: http://gitweb.mageia.org/software/isodumper/tree/lib/raw_format.py the user can choose Fat32, NTFS and ext4. I just added exfat, but wonder if type=parted.PARTITION_NORMAL in line 106 is OK for this case.

dcantrell commented 5 years ago

Hi, I am unable to look at this right now, but I have received the comment and will get to it as soon as I can. Thanks!

dcantrell commented 5 years ago

PARTITION_NORMAL should be fine for exfat on an msdos disk label, but I am not 100% sure because I have not worked with exfat myself. If libparted adds anything specific for exfat, I can expose that in pyparted.

Your code looks fine otherwise.