Apr-27-2022, 06:34 AM
Have to find largest file in a partition of an diskimage tried to make a definition for it but doesn't seem to work
1 2 3 4 5 6 7 |
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.
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.