Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coding: UTF-8
- import os
- import psutil
- import shutil
- import sys
- print("Start Python")
- name = input("Как к вам обращаться?")
- print(name, ",Поздравляем вас с началом обучения языку програмирования Python!!!")
- answer = ''
- do =''
- while answer != 'Q':
- answer = input("Желаете продолжить обучение? (Y/N)")
- if answer == 'Y':
- print("Что вы хотите узнать?")
- elif answer == 'N':
- print("До скорой встречи!")
- do = int(input("Введите значение"))
- if do == 1:
- print("1-Выведу список файлоф",os.listdir())
- elif do == 2:
- print("2-Выведу информацию о процессах",psutil.pids())
- elif do == 3:
- print("3-Выведу информацию о статусе процессора",os.times())
- elif do == 4:
- print("4-Выведу информацию о времени процессора",psutil.cpu_stats())
- elif do == 5:
- print("5-Выведу информацию о платформе",sys.platform)
- elif do == 6:
- print("Дублирование файлов в текущей дериктории-")
- file_list = os.listdir()
- i = 0
- while i < len(file_list):
- newfile = file_list[i] + '.dupl'
- shutil.copy(file_list[i], newfile)
- i += 1
- else:
- print("Что вы хотели сделать?")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement