From 9780f7eabdce984692994250b8a179cff1dc135c Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Fri, 21 Jun 2019 19:45:20 -0700 Subject: change print_info and save_info to info_print and info_save ere --- creator.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'creator.py') diff --git a/creator.py b/creator.py index fd09e2c..a468c2d 100644 --- a/creator.py +++ b/creator.py @@ -69,7 +69,7 @@ class Coordinates: def __str__(self): return type(self).__name__ - def print_info(self, round): + def info_print(self, round): ''' Print all the component's coordinates to the terminal. @@ -91,7 +91,7 @@ class Coordinates: print('z_l the lower z-coordinates:\n', np.around(self.z_l, round)) return None - def save_info(self, save_dir_path, number): + def info_save(self, save_dir_path, number): ''' Save all the object's coordinates (must be full path). ''' @@ -100,7 +100,7 @@ class Coordinates: full_path = os.path.join(save_dir_path, file_name) try: with open(full_path, 'w') as sys.stdout: - self.print_info(6) + self.info_print(6) # This line required to reset behavior of sys.stdout sys.stdout = sys.__stdout__ print('Successfully wrote to file {}'.format(full_path)) @@ -218,8 +218,8 @@ class Airfoil(Coordinates): def add_mass(self, mass): self.mass = mass - def print_info(self, round): - super().print_info(round) + def info_print(self, round): + super().info_print(round) print('x_c the camber x-coordinates:\n', np.around(self.x_u, round)) print('z_c the camber z-coordinates:\n', np.around(self.x_u, round)) return None @@ -408,8 +408,8 @@ class Stringer(Coordinates): self.mass = len(self.x_u) * mass + len(self.x_l) * mass return None - def print_info(self, round): - super().print_info(round) + def info_print(self, round): + super().info_print(round) print('Stringer Area:\n', np.around(self.area, round)) return None -- cgit v1.2.3