-
Notifications
You must be signed in to change notification settings - Fork 1
Waiting review #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…sign into waiting_review µния, зачем нужно
yurii-litvinov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В общем-то, серьёзных замечаний нет, и вроде всё работает. Зачтена.
| #Класс, вызывающий внешние комманды | ||
| class system_commands: | ||
| def run(self, pipe_arg, command_name, arglist): | ||
| #print('command for execute: ', [command_name] + arglist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще, закомментированный код лучше не оставлять, в процессе рефакторинга код вокруг может поменяться, и когда его раскомментируют, он уже не будет работать.
| #У этих классов есть метод run_on, в который передаётся pipe в виде строки и | ||
| #аргументы в виде списка. Возвращает строку-результат | ||
|
|
||
| #Команда 'cat' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне казалось, что комментарии к функциям и классам правильнее писать через """
| #Команда 'pwd' | ||
| class pwd_command: | ||
| def run_on(self, pipe_arg, arglist): | ||
| return os.getcwd()+'\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Бинарные операторы отделяются пробелом (ну, собственно, в остальном коде так и есть)
| 'wc' : wc_command(), | ||
| 'pwd' : pwd_command()} | ||
| self.sys_comm = system_commands() | ||
| #метод для исполния распарсенной строки. Возвращает результат в виде строки. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"исполния", опечатка
| try: | ||
| print(lexec.exec_line(inpline), end='') | ||
| except: | ||
| exit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне кажется, даже для Питона всё в одном файле --- это слишком брутально. И точно вызвало бы проблемы с масштабируемостью при развитии решения. Имеет смысл распилить по нескольким файлам.
No description provided.