Exemplo n.º 1
0
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 * "=")
Exemplo n.º 2
0
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))
Exemplo n.º 3
0
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 * "=")
Exemplo n.º 4
0
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("Ділення на нуль")