Ulli Horlacher <frams...@rus.uni-stuttgart.de> wrote: > eryksun <eryk...@gmail.com> wrote: > > On Thu, Nov 19, 2015 at 10:31 AM, Michael Torrie <torr...@gmail.com> wrote: > > > One windows it might be possible to use the win32 api to enumerate the > > > windows, find your console window and switch to it. > > > > You can call GetConsoleWindow [1] and then SetForegroundWindow [2]. > (...) > > great, this works! Thanks!
One of my Windows test users reports, that the file dialog window of askopenfilename() starts behind the console window and has no focus. On Linux (XFCE) I do not have this problem. I start it with: Tk().withdraw() file = askopenfilename(title='select a file',initialdir=HOME) set_window_focus() # give focus back to console window Can one force askopenfilename() to start in foreground with focus? -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de Universitaet Stuttgart Tel: ++49-711-68565868 Allmandring 30a Fax: ++49-711-682357 70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ -- https://mail.python.org/mailman/listinfo/python-list