# ==============================================================================
"""PRIMEFACTO : compute all prime factorizations for numbers from 2 to n"""
# ==============================================================================
__author__  = "Christophe Schlick"
__version__ = "0.0" # skeleton version
__date__    = "2021-04-01"
__usage__   = """
User input : <n> (where n:int > 1)
App output : sequence of all prime factorizations for numbers from 2 to n""" 
# ==============================================================================
from ezCLI import convert, read_csv, write_ini
# ------------------------------------------------------------------------------
def primefacto(n, primes):
  """compute all prime factorizations for numbers from 2 to n"""
  factos = {} # create empty dictionary to store all prime factorizations
  # TODO
  return factos # return final dictionary with all factorizations up to 'n'
# ------------------------------------------------------------------------------
def main():
  """parse 'command' as integer 'n' before calling 'prime(n)'"""
  primes = read_csv('primes.csv') # read CSV file generated by A8_prime.py
  print(f"{'-'*80}\n{__doc__}{__usage__}\n{'-'*80}") # show info (doc and usage)
  while True: # user interaction loop
    command = input("Enter value for <n> : ") # wait for user input
    if command == '': break # break interaction loop if user input is empty
    # TODO (check if n is an integer and n > 1, then call 'primefacto' function)
  print('See you later...')
# ==============================================================================
if __name__ == "__main__":
  main()
# ==============================================================================
