Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 849ee09

Browse files
committed
GUI
1 parent ff55e6c commit 849ee09

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3428,7 +3428,7 @@ import PySimpleGUI as sg
34283428
layout = [[sg.Text("What's your name?")], [sg.Input()], [sg.Button('Ok')]]
34293429
window = sg.Window('Window Title', layout)
34303430
event, values = window.read()
3431-
print(f'Hello {values[0]}!')
3431+
print(f'Hello {values[0]}!' if event == 'Ok' else '')
34323432
```
34333433

34343434

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,7 @@
29132913
layout = [[sg.Text(<span class="hljs-string">"What's your name?"</span>)], [sg.Input()], [sg.Button(<span class="hljs-string">'Ok'</span>)]]
29142914
window = sg.Window(<span class="hljs-string">'Window Title'</span>, layout)
29152915
event, values = window.read()
2916-
print(<span class="hljs-string">f'Hello <span class="hljs-subst">{values[<span class="hljs-number">0</span>]}</span>!'</span>)
2916+
print(<span class="hljs-string">f'Hello <span class="hljs-subst">{values[<span class="hljs-number">0</span>]}</span>!'</span> <span class="hljs-keyword">if</span> event == <span class="hljs-string">'Ok'</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>)
29172917
</code></pre></div>
29182918

29192919
<div><h2 id="appendix"><a href="#appendix" name="appendix">#</a>Appendix</h2><div><h3 id="cython">Cython</h3><p><strong>Library that compiles Python code into C.</strong></p><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install cython</span>

0 commit comments

Comments
 (0)