Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Coordinates:
- def __init__(self, paramX, paramY):
- self.x = paramX
- self.y = paramY
- def __str__(self):
- return "(" + str(self.x) + "," + str(self.y) + ")"
- # end Coordinates
- class fileReader:
- def __init__(self):
- # constructor contents go here
- self.fname = None
- def readIn(self):
- self.fname = input("Please enter the name of the data file: \n")
- handle = open(self.fname)
- coordList = []
- for line in handle:
- line = line.strip()
- coordSplit = line.split(',') #list of two coordinate components
- myCoord = Coordinates(float(coordSplit[0].replace("(","")),float(coordSplit[1].replace(")","")))
- print(myCoord)
- class coordContainer:
- def __init__(self):
- self.coordList = []
- self.xMin = 0
- self.xMax = 0
- self.yMin = 0
- self.yMax = 0
- def findXMax():
- for i in length(self.coordList):
- if
- #main
- fileHandler = fileReader()
- fileHandler.readIn()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement