добавила создание папок

This commit is contained in:
Anna Smirnova
2019-04-03 15:42:12 +07:00
parent 8cdf41b254
commit b4b67e5a21
2 changed files with 7 additions and 1 deletions

View File

@@ -6,8 +6,14 @@ import matplotlib.pyplot as plt
import pandas as pd
import pylab
n = 10 #количество итераций
n = 1 #количество итераций
current_path = os.getcwd() #определяю путь до папки в которой лежит этот скрипт
if not os.path.exists(current_path + '\Results'):#создаю папку Results
os.makedirs(current_path + '\Results')
if not os.path.exists(current_path + '\Common'):#создаю папку Common
os.makedirs(current_path + '\Common')
if not os.path.exists(current_path + '\Pictures'):#создаю папку Pictures
os.makedirs(current_path + '\Pictures')
pass_to_scenario = current_path + '\Scenario' #эта переменная хранит путь до папки Scenario
for filename in os.listdir(pass_to_scenario): #читаю файл за файлом в директории Scenario, т.е. поочередно иду по каждому сценарию
scenario = filename[0:-4]