python - file opening dialog & drag and drop in pygame -


i want build little application; , has have sort of possibility load files. right copying path application, want build possibility to

  • drop file outside gui and
  • have file opening dialog.

is there way accomplish @ least 1 of requirements? because not want create non-native file opening dialog myself.

you can use file opening dialog tkinter.

to filename code be:

from tkinter.filedialog import askopenfilename  ## or  tkinter.filedialog import *  tkinter import *  root = tk() foo = askopenfilename() root.destroy() print(foo) 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -