Skip to content

Commit

Permalink
Close Program
Browse files Browse the repository at this point in the history
Allows the user to close the program if they entered in the wrong number in the main.py file.
  • Loading branch information
kjkoeller committed Nov 3, 2022
1 parent 96ea095 commit 5bd38c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tess_data_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
Author: Kyle Koeller
Created: 2/19/2022
Last Updated: 9/07/2022
Version: Python 3.9
Last Updated: 11/03/2022
"""

# import required packages
Expand All @@ -23,6 +22,8 @@ def main():
"""

# While loops checks to make sure that the user has entered a valid TIC number that can be found.
print("If you want to close this program type 'Close' in the following prompt.")
print()
while True:
try:
system_name = input("Enter in the TIC-ID given in SIMBAD (TIC 468293391): ")
Expand All @@ -31,6 +32,9 @@ def main():
except astroquery.exceptions.ResolverError:
print("The TIC number you entered is invalid or there is no data for this given system.")

if system_name.lower() == "close":
exit()

# prints off the sector table to let the user know what sectors TESS has observed the object
print(sector_table)
for i in sector_table["sector"]:
Expand Down

0 comments on commit 5bd38c0

Please sign in to comment.