Skip to content

Commit

Permalink
Use ==/!= to compare str literals
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Jun 25, 2019
1 parent 6680820 commit b2ba8ac
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 60 deletions.
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Button_States.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
[window.FindElement(key).Update(disabled=value) for key,value in {'_Start_':False, '_Stop_':True, '_Reset_':True, '_Submit_':True}.items()] [window.FindElement(key).Update(disabled=value) for key,value in {'_Start_':False, '_Stop_':True, '_Reset_':True, '_Submit_':True}.items()]
recording = False recording = False
have_data = False have_data = False
elif event is '_Submit_' and have_data: elif event == '_Submit_' and have_data:
[window.FindElement(key).Update(disabled=value) for key,value in {'_Start_':False, '_Stop_':True, '_Reset_':True, '_Submit_':False}.items()] [window.FindElement(key).Update(disabled=value) for key,value in {'_Start_':False, '_Stop_':True, '_Reset_':True, '_Submit_':False}.items()]
recording = False recording = False
6 changes: 2 additions & 4 deletions DemoPrograms/Demo_Canvas.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
event, values = window.Read() event, values = window.Read()
if event is None: if event is None:
break break
if event is 'Blue': if event in ('Blue', 'Red'):
window.FindElement('canvas').TKCanvas.itemconfig(cir, fill = "Blue") window.FindElement('canvas').TKCanvas.itemconfig(cir, fill=event)
elif event is 'Red':
window.FindElement('canvas').TKCanvas.itemconfig(cir, fill = "Red")
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Chat.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
To see this program RUN on the web go here: To see this program RUN on the web go here:
https://repl.it/@PySimpleGUI/Chat-Application-Demo https://repl.it/@PySimpleGUI/Chat-Application-Demo
Note that the size of the display on repl.it is smaller than most, so the sizes of the Note that the size of the display on repl.it is smaller than most, so the sizes of the
Multiline and Output text areas were reduced in the online version. Nothing else was changed Multiline and Output text areas were reduced in the online version. Nothing else was changed
''' '''


Expand All @@ -31,7 +31,7 @@
# ---===--- Loop taking in user input and using it --- # # ---===--- Loop taking in user input and using it --- #
while True: while True:
event, value = window.Read() event, value = window.Read()
if event is 'SEND': if event == 'SEND':
query = value['query'].rstrip() query = value['query'].rstrip()
# EXECUTE YOUR COMMAND HERE # EXECUTE YOUR COMMAND HERE
print('The command you entered was {}'.format(query)) print('The command you entered was {}'.format(query))
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Chat_With_History.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ def ChatBotWithHistory():
history_offset = 0 history_offset = 0
while True: while True:
(event, value) = window.Read() (event, value) = window.Read()
if event is 'SEND': if event == 'SEND':
query = value['query'].rstrip() query = value['query'].rstrip()
# EXECUTE YOUR COMMAND HERE # EXECUTE YOUR COMMAND HERE
print('The command you entered was {}'.format(query)) print('The command you entered was {}'.format(query))
command_history.append(query) command_history.append(query)
history_offset = len(command_history)-1 history_offset = len(command_history)-1
window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear
window.FindElement('history').Update('\n'.join(command_history[-3:])) window.FindElement('history').Update('\n'.join(command_history[-3:]))
elif event is None or event is 'EXIT': # quit if exit event or X elif event in (None, 'EXIT'): # quit if exit event or X
break break
elif 'Up' in event and len(command_history): elif 'Up' in event and len(command_history):
command = command_history[history_offset] command = command_history[history_offset]
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Chatterbot.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
''' '''
Demo_Chatterbot.py Demo_Chatterbot.py
A GUI wrapped arouind the Chatterbot package. A GUI wrapped arouind the Chatterbot package.
The GUI is used to show progress bars during the training process and The GUI is used to show progress bars during the training process and
to collect user input that is sent to the chatbot. The reply is displayed in the GUI window to collect user input that is sent to the chatbot. The reply is displayed in the GUI window
''' '''


Expand Down Expand Up @@ -67,7 +67,7 @@ def print_progress_bar(description, iteration_counter, total_items, progress_bar
# ---===--- Loop taking in user input and using it to query HowDoI web oracle --- # # ---===--- Loop taking in user input and using it to query HowDoI web oracle --- #
while True: while True:
event, (value,) = window.Read() event, (value,) = window.Read()
if event is not 'SEND': if event != 'SEND':
break break
string = value.rstrip() string = value.rstrip()
print(' '+string) print(' '+string)
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Chatterbot_With_TTS.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
''' '''
Demo_Chatterbot.py Demo_Chatterbot.py
A GUI wrapped arouind the Chatterbot package. A GUI wrapped arouind the Chatterbot package.
The GUI is used to show progress bars during the training process and The GUI is used to show progress bars during the training process and
to collect user input that is sent to the chatbot. The reply is displayed in the GUI window to collect user input that is sent to the chatbot. The reply is displayed in the GUI window
''' '''


Expand Down Expand Up @@ -87,7 +87,7 @@ def speak(text):
# ---===--- Loop taking in user input and using it to query HowDoI web oracle --- # # ---===--- Loop taking in user input and using it to query HowDoI web oracle --- #
while True: while True:
event, (value,) = window.Read() event, (value,) = window.Read()
if event is not 'SEND': if event != 'SEND':
break break
string = value.rstrip() string = value.rstrip()
print(' '+string) print(' '+string)
Expand Down
10 changes: 5 additions & 5 deletions DemoPrograms/Demo_Desktop_Widget_Timer.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@


""" """
Timer Desktop Widget Creates a floating timer that is always on top of other windows You move it by grabbing anywhere on the window Good example of how to do a non-blocking, polling program using SimpleGUI Can be used to poll hardware when running on a Pi Timer Desktop Widget Creates a floating timer that is always on top of other windows You move it by grabbing anywhere on the window Good example of how to do a non-blocking, polling program using SimpleGUI Can be used to poll hardware when running on a Pi
While the timer ticks are being generated by PySimpleGUI's "timeout" mechanism, the actual value While the timer ticks are being generated by PySimpleGUI's "timeout" mechanism, the actual value
of the timer that is displayed comes from the system timer, time.time(). This guarantees an of the timer that is displayed comes from the system timer, time.time(). This guarantees an
accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If
this design were not used, then the time value displayed would slowly drift by the amount of time this design were not used, then the time value displayed would slowly drift by the amount of time
it takes to execute the PySimpleGUI read and update calls (not good!) it takes to execute the PySimpleGUI read and update calls (not good!)
NOTE - you will get a warning message printed when you exit using exit button. NOTE - you will get a warning message printed when you exit using exit button.
It will look something like: invalid command name \"1616802625480StopMove\" It will look something like: invalid command name \"1616802625480StopMove\"
""" """
Expand Down Expand Up @@ -46,9 +46,9 @@
if event == 'button': if event == 'button':
event = window.FindElement(event).GetText() event = window.FindElement(event).GetText()
# --------- Do Button Operations -------- # --------- Do Button Operations --------
if event is None or event == 'Exit': # ALWAYS give a way out of program if event in (None, 'Exit'): # ALWAYS give a way out of program
break break
if event is 'Reset': if event == 'Reset':
start_time = int(round(time.time() * 100)) start_time = int(round(time.time() * 100))
current_time = 0 current_time = 0
paused_time = start_time paused_time = start_time
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_EXE_Maker.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def Launcher():
# ---===--- Loop taking in user input --- # # ---===--- Loop taking in user input --- #
while True: while True:
(button, values) = window.Read() (button, values) = window.Read()
if button is 'Quit' or button is None: if button in ('Quit', None):
break # exit button clicked break # exit button clicked


source_file = values['_sourcefile_'] source_file = values['_sourcefile_']
Expand All @@ -40,7 +40,7 @@ def Launcher():
file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec') file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec')
command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option) command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option)


if button is 'Make EXE': if button == 'Make EXE':
try: try:
print(command_line) print(command_line)
print('Making EXE... this will take a while.. the program has NOT locked up...') print('Making EXE... this will take a while.. the program has NOT locked up...')
Expand Down
6 changes: 3 additions & 3 deletions DemoPrograms/Demo_Fill_Form.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def Everything():
while True: while True:
event, values = window.Read() event, values = window.Read()


if event is 'SaveSettings': if event == 'SaveSettings':
filename = sg.PopupGetFile('Save Settings', save_as=True, no_window=True) filename = sg.PopupGetFile('Save Settings', save_as=True, no_window=True)
window.SaveToDisk(filename) window.SaveToDisk(filename)
# save(values) # save(values)
elif event is 'LoadSettings': elif event == 'LoadSettings':
filename = sg.PopupGetFile('Load Settings', no_window=True) filename = sg.PopupGetFile('Load Settings', no_window=True)
window.LoadFromDisk(filename) window.LoadFromDisk(filename)
# load(form) # load(form)
elif event in ['Exit', None]: elif event in ('Exit', None):
break break


# window.CloseNonBlocking() # window.CloseNonBlocking()
Expand Down
8 changes: 3 additions & 5 deletions DemoPrograms/Demo_Graph_Drawing.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
event, values = window.Read() event, values = window.Read()
if event is None: if event is None:
break break
if event is 'Blue': if event in ('Blue', 'Red'):
graph.TKCanvas.itemconfig(circle, fill = "Blue") graph.TKCanvas.itemconfig(circle, fill=event)
elif event is 'Red': elif event == 'Move':
graph.TKCanvas.itemconfig(circle, fill = "Red")
elif event is 'Move':
graph.MoveFigure(point, 10,10) graph.MoveFigure(point, 10,10)
graph.MoveFigure(circle, 10,10) graph.MoveFigure(circle, 10,10)
graph.MoveFigure(oval, 10,10) graph.MoveFigure(oval, 10,10)
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Matplotlib_Animated.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main():
dpts = [randint(0, 10) for x in range(10000)] dpts = [randint(0, 10) for x in range(10000)]
for i in range(len(dpts)): for i in range(len(dpts)):
event, values = window.Read(timeout=10) event, values = window.Read(timeout=10)
if event is 'Exit' or event is None: if event in ('Exit', None):
exit(69) exit(69)


slider_elem.Update(i) slider_elem.Update(i)
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Matplotlib_Animated_Scatter.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main():


while True: while True:
event, values = window.Read(timeout=10) event, values = window.Read(timeout=10)
if event is 'Exit' or event is None: if event in ('Exit', None):
exit(69) exit(69)


def PyplotScatterWithLegend(): def PyplotScatterWithLegend():
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Matplotlib_Browser.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def draw_figure(canvas, figure, loc=(0, 0)):
event, values = window.Read() event, values = window.Read()
print(event) print(event)
# show it all again and get buttons # show it all again and get buttons
if event is None or event is 'Exit': if event in (None, 'Exit'):
break break


try: try:
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Matplotlib_Browser_Paned.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ def draw_figure(canvas, figure, loc=(0, 0)):
event, values = window.Read() event, values = window.Read()
# print(event) # print(event)
# show it all again and get buttons # show it all again and get buttons
if event is None or event is 'Exit': if event in (None, 'Exit'):
break break


try: try:
Expand Down
6 changes: 3 additions & 3 deletions DemoPrograms/Demo_Matplotlib_Ping_Graph.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
May 1, 2014 May 1, 2014
----------- -----------
Little modifications by Mohammad Emami <emamirazavi@gmail.com> Little modifications by Mohammad Emami <emamirazavi@gmail.com>
- Added Python 3 support. For now this project will just support - Added Python 3 support. For now this project will just support
python 3.x python 3.x
- Tested with python 3.3 - Tested with python 3.3
- version was upped to 0.6 - version was upped to 0.6
March 19, 2013 March 19, 2013
-------------- --------------
Expand Down Expand Up @@ -663,7 +663,7 @@ def main():


while True: while True:
event, values = window.Read(timeout=0) event, values = window.Read(timeout=0)
if event is 'Exit' or event is None: if event in ('Exit', None):
exit(0) exit(0)


run_a_ping_and_graph() run_a_ping_and_graph()
Expand Down
4 changes: 1 addition & 3 deletions DemoPrograms/Demo_Matplotlib_Ping_Graph_Large.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def main():


while True: while True:
event, values = window.Read(timeout=0) event, values = window.Read(timeout=0)
if event is 'Exit' or event is None: if event in ('Exit', None):
break break


run_a_ping_and_graph() run_a_ping_and_graph()
Expand All @@ -106,5 +106,3 @@ def main():


if __name__ == '__main__': if __name__ == '__main__':
main() main()


6 changes: 3 additions & 3 deletions DemoPrograms/Demo_NonBlocking_Form.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def StatusOutputExample():
# This is the code that reads and updates your window # This is the code that reads and updates your window
event, values = window.Read(timeout=10) event, values = window.Read(timeout=10)
window.FindElement('output').Update('{:02d}:{:02d}.{:02d}'.format((i // 100) // 60, (i // 100) % 60, i % 100)) window.FindElement('output').Update('{:02d}:{:02d}.{:02d}'.format((i // 100) // 60, (i // 100) % 60, i % 100))
if event == 'Quit' or event is None: if event in ('Quit', None):
break break
if event == 'LED On': if event == 'LED On':
print('Turning on the LED') print('Turning on the LED')
Expand Down Expand Up @@ -63,9 +63,9 @@ def RemoteControlExample():
while (True): while (True):
# This is the code that reads and updates your window # This is the code that reads and updates your window
event, values = window.Read(timeout=0, timeout_key='timeout') event, values = window.Read(timeout=0, timeout_key='timeout')
if event is not 'timeout': if event != 'timeout':
print(event) print(event)
if event == 'Quit' or event is None: if event in ('Quit', None):
break break


window.Close() window.Close()
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_OpenCV.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main():
i = 0 i = 0
while vidFile.isOpened(): while vidFile.isOpened():
event, values = window.Read(timeout=0) event, values = window.Read(timeout=0)
if event is 'Exit' or event is None: if event in ('Exit', None):
exit(69) exit(69)
ret, frame = vidFile.read() ret, frame = vidFile.read()
if not ret: # if out of data stop looping if not ret: # if out of data stop looping
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Pi_LEDs.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def FlashLED():
if event is None: if event is None:
break break


if event is 'Switch LED': if event == 'Switch LED':
window.FindElement('output').Update(SwitchLED()) window.FindElement('output').Update(SwitchLED())
elif event is 'Flash LED': elif event == 'Flash LED':
window.FindElement('output').Update('LED is Flashing') window.FindElement('output').Update('LED is Flashing')
window.Refresh() window.Refresh()
FlashLED() FlashLED()
Expand Down
2 changes: 1 addition & 1 deletion DemoPrograms/Demo_Script_Launcher.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def Launcher2():
print('Quickly launch your favorite programs using these shortcuts') print('Quickly launch your favorite programs using these shortcuts')
print('Or copy files to your github folder. Or anything else you type on the command line') print('Or copy files to your github folder. Or anything else you type on the command line')
# copyfile(source, dest) # copyfile(source, dest)
elif event is 'Run': elif event == 'Run':
for index, file in enumerate(values['demolist']): for index, file in enumerate(values['demolist']):
print('Launching %s'%file) print('Launching %s'%file)
window.Refresh() # make the print appear immediately window.Refresh() # make the print appear immediately
Expand Down
4 changes: 2 additions & 2 deletions DemoPrograms/Demo_Timer.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def Timer():
if values is None or button == 'Exit': if values is None or button == 'Exit':
break break


if button is 'Reset': if button == 'Reset':
i=0 i=0
elif button is 'Pause': elif button == 'Pause':
paused = not paused paused = not paused


if not paused: if not paused:
Expand Down
6 changes: 2 additions & 4 deletions DemoPrograms/Demo_Youtube-dl_Frontend.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import subprocess import subprocess


""" """
Simple wrapper for youtube-dl.exe. Simple wrapper for youtube-dl.exe.
Paste the youtube link into the GUI. The GUI link is queried when you click Get List. Paste the youtube link into the GUI. The GUI link is queried when you click Get List.
Get List will populate the pulldown list with the language options available for the video. Get List will populate the pulldown list with the language options available for the video.
Choose the language to download and click Download Choose the language to download and click Download
Expand Down Expand Up @@ -45,9 +45,7 @@ def DownloadSubtitlesGUI():
print('Done') print('Done')


elif event == 'Download': elif event == 'Download':
lang = values['lang'] lang = values['lang'] or 'en'
if lang is '':
lang = 'en'
print(f'Downloading subtitle for {lang}...') print(f'Downloading subtitle for {lang}...')
window.Refresh() window.Refresh()
command = [f'C:\\Python\\Anaconda3\\Scripts\\youtube-dl.exe --sub-lang {lang} --write-sub {link}',] command = [f'C:\\Python\\Anaconda3\\Scripts\\youtube-dl.exe --sub-lang {lang} --write-sub {link}',]
Expand Down
4 changes: 2 additions & 2 deletions HowDoI/PySimpleGUI-HowDoI.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ def HowDoI():
history_offset = 0 history_offset = 0
while True: while True:
(button, value) = window.Read() (button, value) = window.Read()
if button is 'SEND': if button == 'SEND':
query = value['query'].rstrip() query = value['query'].rstrip()
print(query) print(query)
QueryHowDoI(query, value['Num Answers'], value['full text']) # send the string to HowDoI QueryHowDoI(query, value['Num Answers'], value['full text']) # send the string to HowDoI
command_history.append(query) command_history.append(query)
history_offset = len(command_history)-1 history_offset = len(command_history)-1
window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear
window.FindElement('history').Update('\n'.join(command_history[-3:])) window.FindElement('history').Update('\n'.join(command_history[-3:]))
elif button is None or button is 'EXIT': # if exit button or closed using X elif button in (None, 'EXIT'): # if exit button or closed using X
break break
elif 'Up' in button and len(command_history): # scroll back in history elif 'Up' in button and len(command_history): # scroll back in history
command = command_history[history_offset] command = command_history[history_offset]
Expand Down
6 changes: 3 additions & 3 deletions PySimpleGUIQt/Demo Programs/Qt_Demo_Desktop_Widget_Timer.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
of the timer that is displayed comes from the system timer, time.time(). This guarantees an of the timer that is displayed comes from the system timer, time.time(). This guarantees an
accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If
this design were not used, then the time value displayed would slowly drift by the amount of time this design were not used, then the time value displayed would slowly drift by the amount of time
it takes to execute the PySimpleGUI read and update calls (not good!) it takes to execute the PySimpleGUI read and update calls (not good!)
NOTE - you will get a warning message printed when you exit using exit button. NOTE - you will get a warning message printed when you exit using exit button.
It will look something like: invalid command name \"1616802625480StopMove\" It will look something like: invalid command name \"1616802625480StopMove\"
Expand Down Expand Up @@ -48,9 +48,9 @@
if event == 'button': if event == 'button':
event = window.FindElement(event).GetText() event = window.FindElement(event).GetText()
# --------- Do Button Operations -------- # --------- Do Button Operations --------
if event is None or event == 'Exit': # ALWAYS give a way out of program if event in (None, 'Exit'): # ALWAYS give a way out of program
break break
if event is 'Reset': if event == 'Reset':
start_time = int(round(time.time() * 100)) start_time = int(round(time.time() * 100))
current_time = 0 current_time = 0
paused_time = start_time paused_time = start_time
Expand Down
4 changes: 2 additions & 2 deletions PySimpleGUIWeb/Demo Programs/Web_Timer.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
if event == 'button': if event == 'button':
event = window.FindElement(event).GetText() event = window.FindElement(event).GetText()
# --------- Do Button Operations -------- # --------- Do Button Operations --------
if event is None or event == 'Exit': # ALWAYS give a way out of program if event in (None, 'Exit'): # ALWAYS give a way out of program
break break
if event is 'Reset': if event == 'Reset':
start_time = int(round(time.time() * 100)) start_time = int(round(time.time() * 100))
current_time = 0 current_time = 0
paused_time = start_time paused_time = start_time
Expand Down
4 changes: 2 additions & 2 deletions exemaker/pysimplegui-exemaker/pysimplegui-exemaker.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def Launcher():
# ---===--- Loop taking in user input --- # # ---===--- Loop taking in user input --- #
while True: while True:
(button, values) = window.Read() (button, values) = window.Read()
if button is 'Quit' or button is None: if button in ('Quit', None):
break # exit button clicked break # exit button clicked


source_file = values['_sourcefile_'] source_file = values['_sourcefile_']
Expand All @@ -40,7 +40,7 @@ def Launcher():
file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec') file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec')
command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option) command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option)


if button is 'Make EXE': if button == 'Make EXE':
out='' out=''
try: try:
print(command_line) print(command_line)
Expand Down

0 comments on commit b2ba8ac

Please sign in to comment.