tkinter filedialog, Dialog erscheint nicht
Verfasst: Freitag 2. August 2019, 10:40
Hallo, bin python Neuling und habe folgendes Problem:
Folgender code öffnet einen Dialog um einen Pfad auszuwählen
from tkinter import filedialog
from tkinter import *
root = Tk()
root.withdraw() #Since I only need the filedialog and not a blank window at the back
source_folder = filedialog.askdirectory(title = 'Select Source Folder')
Das ganze funktioniert solange man das Programm in spyder ablaufen lässt.
Wenn man das Programm allerdings ausserhalb der IDE startet, erscheint das Dialogfenster nicht.
Kann mir dazu jemand helfen? Danke
Folgender code öffnet einen Dialog um einen Pfad auszuwählen
from tkinter import filedialog
from tkinter import *
root = Tk()
root.withdraw() #Since I only need the filedialog and not a blank window at the back
source_folder = filedialog.askdirectory(title = 'Select Source Folder')
Das ganze funktioniert solange man das Programm in spyder ablaufen lässt.
Wenn man das Programm allerdings ausserhalb der IDE startet, erscheint das Dialogfenster nicht.
Kann mir dazu jemand helfen? Danke