neues ding


SUBMITTED BY: bitcoinsachen

DATE: Oct. 22, 2016, 6:13 p.m.

FORMAT: Python 3

SIZE: 670 Bytes

HITS: 446

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Created on Mon Oct 17 16:24:09 2016
  5. @author: andreaskuk
  6. @Matrikelnummer: 1525911
  7. @Seminar: Wissenschaftliches Programmieren in Python
  8. """
  9. import numpy as np
  10. mypath= 'imsil_out'
  11. from os import listdir
  12. onlyfiles= [f for f in listdir(mypath) if f.endswith('.out')] #suche datein mit der Endung .out im ordner mypath
  13. print('filelist: ',onlyfiles)
  14. f_1 = mypath+'/'+onlyfiles[0]
  15. #print(f_1)
  16. """f = open(f_1)
  17. f=f.read()
  18. search = 'tilt='
  19. line = f.readline()"""
  20. searchfile = open(f_1, "r")
  21. for line in searchfile:
  22. if "tilt=" in line:
  23. print (line)
  24. searchfile.close()
  25. #print(f)

comments powered by Disqus