コード例 #1
0
ファイル: __main__.py プロジェクト: AndriyMoshchuk/Lab
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 * "=")
コード例 #2
0
ファイル: __main__.py プロジェクト: Dmytro32/lab2a
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))
コード例 #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 * "=")
コード例 #4
0
ファイル: __main__.py プロジェクト: BogdanIsLaugh/Dev_lab
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("Ділення на нуль")