Skip to content

Commit c2a3d9a

Browse files
committed
add again the other options
1 parent f1ce42e commit c2a3d9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

eval-file-pyqt5-set-value/python/input-number.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
def get_the_value(outer_locals):
22
from PyQt5.QtWidgets import QInputDialog
3+
# locals().update(outer_locals) # a way to make the locals difference explicit
34
num, ok = QInputDialog.getInt(None, 'The number to be set', 'enter a number')
45
if ok:
56
outer_locals['set_the_answer'](num)
7+
# locals()['set_the_answer'](num)
8+
# set_the_answer(num) # this cannot work (see README)
69

710
if __name__ == '__main__':
811
from PyQt5.QtWidgets import QApplication

0 commit comments

Comments
 (0)