From 97aacc73847a4ab998603b2f52b502d7a0401859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Mon, 17 Jun 2024 22:08:45 +0300 Subject: [PATCH] CSD Shell example and modified add_list_to_set Page 133 match --- ChangeLog | 4 ++++ python/add_list_to_set.py | 8 +------- python/psd-shell.py | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 python/psd-shell.py diff --git a/ChangeLog b/ChangeLog index 31a156b..129dc95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-06-17 hwpplayer1 + + * python/Python.pdf: CSD (PSD) shell example written page 133 + 2024-06-09 Mert Gör * python/Python.pdf: continue Deyimi sayfa 132 diff --git a/python/add_list_to_set.py b/python/add_list_to_set.py index d775ecc..fbbe96e 100644 --- a/python/add_list_to_set.py +++ b/python/add_list_to_set.py @@ -1,9 +1,3 @@ -""" -Experimental code written by Mert Gör(hwpplayer1) -GPLv3-or-later -""" - mert = set('mert') gor = ['g','o','r'] -mert.update(gor) -print(mert) +print(gor,mert) diff --git a/python/psd-shell.py b/python/psd-shell.py new file mode 100644 index 0000000..2d48217 --- /dev/null +++ b/python/psd-shell.py @@ -0,0 +1,14 @@ +while True: + cmd = input('PSD>').strip() + if cmd == '': + continue + if cmd == 'dir': + print('dir command') + elif cmd == 'del': + print('del command') + elif cmd == 'copy': + print('copy command') + elif cmd == 'exit': + break + else: + print('bad command!')