def run(self): filename = self.var.get() try: self.data = Dataset(filename) d = run(*self.data.get()) print(d) except FileNotFoundError: mb.showerror("ERROR!", "File {} not found, pleas try again".format(filename)) self.filename_entry.delete(0, END)
print("p1: ", data1.get()[1][1::2]) print("p2: ", data1.get()[2][1::2]) #''' print("000000000000000000000000000000000000000000000000000000000000000") data1 = Dataset() print("cl: ", data1.get()[0][2::3]) print("p1: ", data1.get()[1][1::2]) print("p2: ", data1.get()[2][1::2]) data1 += data2 # data1 += data3 print("cl: ", data1.get()[0][2::3]) print("p1: ", data1.get()[1][1::2]) print("p2: ", data1.get()[2][1::2]) data1 += data3 print("cl: ", data1.get()[0][2::3]) print("p1: ", data1.get()[1][1::2]) print("p2: ", data1.get()[2][1::2]) print("000000000000000000000000000000000000000000000000000000000000000") data = Dataset() # data = Dataset("data001.txt") dirname = sys.argv[1] if len(sys.argv) > 1 else None for filename in sorted(os.listdir(dirname or '.')): if filename.startswith('data') and filename.endswith('.txt'): data += Dataset(filename) # run(*data.get()) print("cl: ", data.get()[0]) print("p1: ", data.get()[1]) print("p2: ", data.get()[2]) # run(*data.get()) run(data.get()[0], (data.get())[1], (data.get())[2]) pass
def file_work(): for file in sys_work(): print(file) control_list, probe_1_list, probe_2_list = file2lists(file) condition = {"temperature": "<30"} run(control_list, probe_1_list, probe_2_list, condition=None)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' The programm prints a report about equipment operation in the form: Time = 11, Temperature = 12, Current = 13, Probe_1 = 14, Probe_2 = 15 :args: current directroy if no argumet, else 'directory' :param: files named "data*.txt". Each file consists of lines with data \ from equipment operation. ''' import os import sys import cProfile from dataset import Dataset from task6_module import run data = Dataset() dirname = sys.argv[1] if len(sys.argv) > 1 else None for filename in sorted(os.listdir(dirname or '.')): if filename.startswith('data') and filename.endswith('.txt'): data += Dataset(filename) run(*data.get()) # cProfile.run('run(*data.get())') # help('task08') # help('dataset')