My Goal:
Current goal for me is to return values that don't contain the value test.docx
My Current code:
I have this code here:
# Create a Tkinter variable
self.tkvar = StringVar()
# Directory
self.directory = "C:/Users/label/Desktop/Sign off project/test only/to sign"
self.choices = glob.glob(os.path.join(self.directory, "*")) #all choices
What it does:
That gives me all file names inside a specific folder. How can I add a condition not to return me values that end with "test.docx"
Would your answer depend on the following code?
I have this code here, it's a OptionMenu
/ drop down menu of values in tkinter
.
I have added this in, as I believe the code may be slightly different when working with drop down menu's
self.popupMenu = OptionMenu(main, self.tkvar, *self.choices) # Dropdown menu of all files inside the folder