Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. class Coordinates:
  2. def __init__(self, paramX, paramY):
  3. self.x = paramX
  4. self.y = paramY
  5. def __str__(self):
  6. return "(" + str(self.x) + "," + str(self.y) + ")"
  7.  
  8. # end Coordinates
  9.  
  10. class fileReader:
  11. def __init__(self):
  12. # constructor contents go here
  13. self.fname = None
  14. def readIn(self):
  15. self.fname = input("Please enter the name of the data file: \n")
  16. handle = open(self.fname)
  17. coordList = []
  18. for line in handle:
  19. line = line.strip()
  20. coordSplit = line.split(',') #list of two coordinate components
  21. myCoord = Coordinates(float(coordSplit[0].replace("(","")),float(coordSplit[1].replace(")","")))
  22. print(myCoord)
  23.  
  24. class coordContainer:
  25. def __init__(self):
  26. self.coordList = []
  27. self.xMin = 0
  28. self.xMax = 0
  29. self.yMin = 0
  30. self.yMax = 0
  31. def findXMax():
  32. for i in length(self.coordList):
  33. if
  34.  
  35. #main
  36. fileHandler = fileReader()
  37. fileHandler.readIn()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement