def main(text): print(f"We are in the {__name__}") print(common.get_current_date().now()) print(common.get_current_platform()) if text: print("З консолі було передано аргумент\n", 10 * "=", f">> {text} <<", 10 * "=")
def main(text): print(f"We are in the {__name__}") print(common.get_current_date().now()) print(common.get_current_platform()) if text: print("З консолі було передано аргумент\n", 10 * "=", f">> {text} <<", 10 * "=") common.Myfunction() try: res = common.fun_with_error() logger.info('Все добре') except Exception as e: logger.error('Все погано:' + str(e))
def main(text): print(f"We are in the {__name__}") print(common.get_current_date().now()) print(common.get_current_platform()) #III common.myfoo1(args.value) #IV common.myfoo2(logger, args.value) if text: print("З консолі було передано аргумент\n", 10 * "=", f">> {text} <<", 10 * "=")
def main(text): print(f"We are in the {__name__}") print(common.get_current_date().now()) print(common.get_current_platform()) if text: print("З консолі було передано аргумент\n", 10*"=", f">> {text} <<", 10*"=") common.print_numbers(False) try: common.wrong_function() logger.info("функція відпрацювала добре") except Exception as e: logger.error("Ділення на нуль")