neues ding 2


SUBMITTED BY: bitcoinsachen

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

FORMAT: Python 3

SIZE: 770 Bytes

HITS: 544

  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[13]
  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. auslesen = line
  25. sss=auslesen[18:23]
  26. searchfile.close()
  27. print(auslesen[18:23])
  28. #print(f)

comments powered by Disqus