Smallest file browser in Python and tkinter

A very little file browser

import os
import tkinter as tk

def browser():
	root = tk.Tk()
	root.title("Browser")
	root.geometry("400x400")

	def openfile(evt):
		pass

	listbox = tk.Listbox(root, bg='yellow', fg='blue')
	listbox.pack(expand=tk.YES, fill=tk.BOTH)
	listbox.bind("<<ListBoxSelect>>", openfile)

	for file in os.listdir():
		listbox.insert(0,file)

	root.mainloop()

browser()

What is this?


Subscribe to the newsletter for updates
Tkinter templates

Avatar My youtube channel

Twitter: @pythonprogrammi - python_pygame

Claude's Games

Arkanoid
Platform 2d

1. Memory game

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts

Advertisement