level student doing my second year project in computing and have decide to try and create a utility that access the USB drives and return a percentage value of how much space the different files and folders take up of the USB in a GUI(code for GUI).
from tkinter import *
from tkinter.ttk import *
def select():
sf = "value is %s" % var.get()
root.title(sf)
# optional
color = var.get()
root['bg'] = color
root = Tk()
# use width x height + x_offset + y_offset (no spaces!)
root.geometry("%dx%d+%d+%d" % (1000, 600, 10, 10))
root.title("USB scanner")
frame1=Frame(root)
frame1.pack(side=TOP, anchor=W)
var = StringVar(root)
# initial value
var.set('select drive')
choices = ['', '', '', '','', '']
option = OptionMenu(frame1, var, *choices)
option.pack(side=LEFT)
button = Button(frame1, text="Scan selected drive", command=select)
button.pack(side=LEFT, padx=30, pady=30)
root.mainloop()
i have installed pyUSB-1.0.0a2 and libopenusb-1.1.11 i keep getting the back end is not available error i have checked DLL. if i'm honest i don't know what i'm doing to much so any basic help is appreciated