Sha256: b4c3e07abd61aaac6ea4c7136c18597f430be2858f8a90c22c65e90717f1fb01
Contents?: true
Size: 567 Bytes
Versions: 9
Compression:
Stored size: 567 Bytes
Contents
# Specify the title and message and filter to txt files file = open_file_dialog( "Open a single file", "Choose something interesting", filter=".txt" ) print(file) # Python tempfile.NamedTemporaryFile object print(file.filename()) # Filename that was selected in the dialog print(file.read()) file.close() files = open_files_dialog("Open multiple files") # message is optional print( files ) # Array of tempfile.NamedTemporaryFile objects (even if you select only one) for file in files: print(file.filename()) print(file.read()) file.close()
Version data entries
9 entries across 9 versions & 1 rubygems