Good day all.
Good day all.
I am new to programming period. I have chosen Python as my first language. I have given myself a few projects. I am stuck with one.
I have created a GUI(tkinter) and I am using Listbox. I am able to os.chdir(Change Directory) so I can view the files that are in a folder on my machine. However, I am not able to pull up any of the files. Whenever I click on a file, the name of the file shows up in my terminal. I want the file i.e. pdf, docx, etc... to be displayed.
Anybody have any ideas as to how I can make this happen?
Variables and their attributes I am creating for this Application
listbox = Listbox(root, width=50, height=20, relief=RAISED, bg='yellow', font=('times', 12), yscrollcommand=scrollbar.set)
for name in os.listdir(os.chdir('C:\\Users\Broth_000\\Desktop\\PC\\')):
#Definitions I am creating for this Application
for i in a:
w = event.widget
idx = int(w.curselection())
value = w.get(idx)
#Buttons I will be using for this Application and their attributes
btn1 = Button(bottomFrame, text="Print", width=40, relief=RAISED, bd=8, fg="blue", command=pSelection)
btn2 = Button(bottomFrame, text="Print2", width=40, relief=RAISED, bd=8, fg="blue", command=OnDouble)
btn2.bind(root, "<Button-1>", partial(OnDouble, name=name))
#Where I am placing buttons for this Application
#Command to keep the window open
After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...
Python GUI Programming Projects using Tkinter and Python 3
Guide to Python Programming Language