You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defopenfolderdialog(stdscr,title: str="Please choose a folder",directory: str=os.getcwd()) ->str:
173
+
"""Start a filedialog to open a file. title is the prompt the use recieves. filter is the file filter. The filter syntax is the same as TK syntax. The first
174
+
filter provided is the main filter.
175
+
Filter Syntax:
176
+
[[GLOB,NAME],[GLOB,NAME]]
177
+
Glob is a pattern to match for files (like *.txt)
178
+
Name is a file type like (Text Files)
179
+
180
+
directory is the directory that the dialog opens to
npath=cp.cursesinput(stdscr,"Please enter new path").replace("\n","")
276
+
ifos.path.isdir(npath):
277
+
directory=npath
278
+
selected=0
279
+
yoffset=0
280
+
refresh=True
281
+
else:
282
+
messagebox.showwarning(stdscr,["Path does not exist"])
283
+
elifch==104:
284
+
cp.displaymsg(stdscr,["List of Keybinds","Down Arrow: Scroll down","Up Arrow: Scroll up","Left Arrow: Scroll left","Right Arrow: Scroll right","Shift-left arrow: Move up to parent Directory","Enter: Open","S: Choose folder","L: Change location"])
285
+
286
+
#masterlist.clear()
287
+
170
288
defopenfilesdialog(stdscr,title: str="Please choose a file",filter: str= [["*","All Files"]],directory: str=os.getcwd()) ->list:
171
289
"""Start a filedialog to select multiple files. title is the prompt the user recieves. filter is the file filter. The filter syntax is the same as TK syntax. The first
0 commit comments