is there any way to get list of files in application?
|
02-26-2024, 01:20 PM
Post: #1
|
|||
|
|||
is there any way to get list of files in application?
I have a Python program where I want the user to be able to pick a file from the Python application files but I can't see any way of getting the list of files either natively on the Prime or via Python.
Am I missing something or is this currently not possible? I can open files that I've added to Python without a problem but I want a list of them so I can display and let the user choose one (no os.listdir() etc). Thanks Calculator Clique on YouTube |
|||
02-26-2024, 01:26 PM
Post: #2
|
|||
|
|||
RE: is there any way to get list of files in application?
(02-26-2024 01:20 PM)dmh Wrote: I have a Python program where I want the user to be able to pick a file from the Python application files but I can't see any way of getting the list of files either natively on the Prime or via Python. Try this: Code: from hpprime import eval as ppleval The list with file names will be stored in the variable "files". |
|||
02-27-2024, 12:59 AM
Post: #3
|
|||
|
|||
RE: is there any way to get list of files in application?
Perfect - thank you!!!
I actually found some samples using AFiles but they were all reading and writing files and I didn't see this exact example. (02-26-2024 01:26 PM)komame Wrote:(02-26-2024 01:20 PM)dmh Wrote: I have a Python program where I want the user to be able to pick a file from the Python application files but I can't see any way of getting the list of files either natively on the Prime or via Python. Calculator Clique on YouTube |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)