Created
April 24, 2016 19:19
-
-
Save thirdknife/d8996fb90cb3002114171f950cd63c56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_dataset(filehandle, start_dataset,end_dataset): # dataset_type : Dataset_01, Dataset_02, Dataset_03 or Dataset_04 | |
| dataset = [] | |
| with open(filehandle) as lines: | |
| for num, line in enumerate(lines, 1): | |
| if start_dataset in line: | |
| start_pos = num | |
| if end_dataset in line: | |
| end_pos = num | |
| line = line.replace(" ", "") | |
| #if line != "\n": | |
| #print(line.split(";")) | |
| lines = open(filehandle).readlines() | |
| for x in range(start_pos, end_pos): | |
| print(lines[x]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment