Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image processing
#1
Have to find largest file in a partition of an diskimage tried to make a definition for it but doesn't seem to work
def LF_file():
    largest_file = {'file': '', 'size': 0}
    if size => largest_file['size']:
        largest_file['file'] = file_obj
        largest_file['size'] = size
    print("The largest file is: %s" % largest_file['file'].info.name.name)
    return
Larz60+ write Apr-27-2022, 08:37 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020