Exemplo n.º 1
0
def button99():
    imwatchingyou.show_debugger_window()
Exemplo n.º 2
0
     sg.Button('Popout')],
]

window = sg.Window('This is your Application Window', layout)

counter = 0
timeout = 100

# Start the program with the popout window showing so you can immediately start debugging!
imwatchingyou.show_debugger_popout_window()

while True:  # Your Event Loop
    event, values = window.Read(timeout=timeout)
    if event in (None, 'Exit'):
        break
    elif event == 'Ok':
        print('You clicked Ok.... this is where print output goes')
        imwatchingyou.show_debugger_popout_window()  # STEP 2 also
    elif event == 'Debugg':
        imwatchingyou.show_debugger_window()  # STEP 2
    elif event == 'Popout':
        imwatchingyou.show_debugger_popout_window()  # STEP 2
    counter += 1
    # to prove window is operating, show the input in another area in the window.
    window.Element('_OUT_').Update(values['_IN_'])

    # don't worry about the "state" of things, just call this function "frequently"
    imwatchingyou.refresh_debugger()  # STEP 3 - refresh debugger

window.Close()
Exemplo n.º 3
0
import PySimpleGUIQt as sg
import imwatchingyou
"""
    Combining the imwatchingyou debugger package with PySimpleGUIQt
    This enables you to have a live debugger / REPL in a running PySimpleGUIQt program
"""
layout = [[sg.Text('My PySimpleGUIQt layout')],
          [sg.B('OK'), sg.B('Debugger'),
           sg.B('Popout')]]

window = sg.Window('My window', layout)

counter = 0  # something to see updating in the popout window
while True:
    event, values = window.read(timeout=100)
    if event is None:
        break
    if event == 'Debugger':
        imwatchingyou.show_debugger_window()
    elif event == 'Popout':
        imwatchingyou.show_debugger_popout_window()
    imwatchingyou.refresh_debugger()
    counter += 1