2018-09-27 20:24:09 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
2018-09-28 18:57:37 +00:00
|
|
|
if sys.version_info[0] >= 3:
|
2018-09-27 20:24:09 +00:00
|
|
|
import PySimpleGUI as sg
|
2018-09-28 18:57:37 +00:00
|
|
|
else:
|
|
|
|
import PySimpleGUI27 as sg
|
2018-08-04 11:38:36 +00:00
|
|
|
|
2018-09-23 16:16:50 +00:00
|
|
|
layout = [[sg.Text('Filename', )],
|
|
|
|
[sg.Input(), sg.FileBrowse()],
|
|
|
|
[sg.OK(), sg.Cancel()]]
|
2018-08-04 11:38:36 +00:00
|
|
|
|
2018-09-24 22:01:00 +00:00
|
|
|
button, (number,) = sg.Window('Get filename example').LayoutAndRead(layout)
|
2018-08-04 11:38:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-23 16:16:50 +00:00
|
|
|
import PySimpleGUI as sg
|
2018-08-04 11:38:36 +00:00
|
|
|
|
2018-09-24 22:01:00 +00:00
|
|
|
button, (filename,) = sg.Window('Get filename example').LayoutAndRead(
|
2018-09-23 16:16:50 +00:00
|
|
|
[[sg.Text('Filename')], [sg.Input(), sg.FileBrowse()], [sg.OK(), sg.Cancel()]])
|