Python Forum

Full Version: FileBrowser dialog
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Simple situation: Looking to do a file browser dialog in Python, that is text-based.
System: Ubuntu 17.01, Python 3.6
Simple question: Has anyone worked out a module to do this, yet? (be gentle, still new at Python)
Angel
What does a text-based dialog look like?
Are you talking about re-implementing the ls command?
It operates like a gui-based file browser dialog, but it's window is simulated in text.

Example: ─░mage
Oh, ok. Probably starting with curses would be the way to go, then, right? https://docs.python.org/3/howto/curses.html

The Last File Manager is apparently written in python: https://inigo.katxi.org/devel/lfm/
All GUI toolkit can bring up OS native file dialog.
You can look at with TKinter which come with Python.
import tkinter as tk
from tkinter import filedialog

root = tk.Tk()
root.withdraw()
file_path = filedialog.askopenfilename()
print(file_path)
Ok, lets start over ... your responses are acknowledged, but if you will all notice, the original question has not how to do it... it was "Has anyone worked out a module to do this, yet?". I'm trying to avoid re-inventing the wheel, if someone's already figured it out. Angel