-
Notifications
You must be signed in to change notification settings - Fork 74
Development
import pypff
pypff.get_version()
import pypff
pff_file = pypff.file()
pff_file.open("Archive.pst")
pff_file.close()
Note that the explicit call to close is not required.
import pypff
file_object = open("Archive.pst", "rb")
pff_file = pypff.file()
pff_file.open_file_object(file_object)
pff_file.close()
Note that the explicit call to close is not required.
A pypff.item is the base object for the different kind of items stored in the PFF file.
The number of items can be retrieved by either calling the get_number_of_items() function, e.g.
number_of_items = pff_file.get_number_of_items()
or reading the number_of_items property:
number_of_items = pff_file.number_of_items
The number of recovered items can be obtained by calling the function pff_file.get_number_of_recovered_items() or reading the property pff_file.number_of_recovered_items.
An item can be retrieved by index:
pff_item = pff_file.get_item(0)
The function will return the most specific item object type. This will either be pypff.item, pypff.folder, pypff.message. Where pypff.item is the base type for the other types.
A recovered item can be retrieved in the same way by using the function pff_file.get_recovered_item().
for pff_item in pff_file.items:
if isinstance(pff_item, pypff.url):
print pff_item.location
The recovered items can iterated by reading the property pff_file.recovered_items.
import pypff
help(pypff)
help(pypff.file)
help(pypff.item)
help(pypff.folder)
help(pypff.message)