Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class Crystal:
  2.  
  3. # Variables
  4. cid = -1
  5. thetaID = -1
  6. phiID = -1
  7. theta = 0.0
  8. phi = 0
  9.  
  10. def __init__(self, cid):
  11. self.cid = cid
  12. f = open('crystalData', 'r')
  13. for i, line in enumerate(f):
  14. if i == cid+1:
  15. print line
  16. arr = (line.replace(" ", "")).split('|')
  17. self.cid = int(arr[1])
  18. self.thetaID = int(arr[2])
  19. self.theta = float(arr[3])
  20. #print(cid, thetaID, theta)
  21. print thetaID
  22. break
  23.  
  24.  
  25.  
  26. crystal = Crystal(2015)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement