当前位置: 首页>>代码示例>>Python>>正文


Python Exit.printThisIsNoLibraryFile方法代码示例

本文整理汇总了Python中lib.Functions.Exit.printThisIsNoLibraryFile方法的典型用法代码示例。如果您正苦于以下问题:Python Exit.printThisIsNoLibraryFile方法的具体用法?Python Exit.printThisIsNoLibraryFile怎么用?Python Exit.printThisIsNoLibraryFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lib.Functions.Exit的用法示例。


在下文中一共展示了Exit.printThisIsNoLibraryFile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print

# 需要导入模块: from lib.Functions import Exit [as 别名]
# 或者: from lib.Functions.Exit import printThisIsNoLibraryFile [as 别名]
				print("{YELLOW}    {name}:{NOCOLOR} {cause}".format(name=cause.__class__.__name__, cause= str(cause), **Init.Foreground))
		elif isinstance(cause, ToolChainException):
			print("{YELLOW}  {name}:{NOCOLOR} {cause}".format(name=cause.__class__.__name__, cause=str(cause), **Init.Foreground))
			cause = cause.__cause__
			if (cause is not None):
				if isinstance(cause, OSError):
					print("{YELLOW}    {name}:{NOCOLOR} {cause}".format(name=cause.__class__.__name__, cause=str(cause), **Init.Foreground))
			else:
				print("  Possible causes:")
				print("   - The compile order is broken.")
				print("   - A source file was not compiled and an old file got used.")

		if (not (verbose or debug)):
			print()
			print("{CYAN}  Use '-v' for verbose or '-d' for debug to print out extended messages.{NOCOLOR}".format(**Init.Foreground))
		Exit.exit(1)

	except EnvironmentException as ex:          Exit.printEnvironmentException(ex)
	except NotConfiguredException as ex:        Exit.printNotConfiguredException(ex)
	except PlatformNotSupportedException as ex:  Exit.printPlatformNotSupportedException(ex)
	except ExceptionBase as ex:                  Exit.printExceptionbase(ex)
	except NotImplementedError as ex:            Exit.printNotImplementedError(ex)
	# except Exception as ex:                      Exit.printException(ex)

# entry point
if __name__ == "__main__":
	Exit.versionCheck((3,5,0))
	main()
else:
	Exit.printThisIsNoLibraryFile(PoC.HeadLine)
开发者ID:Kirtika-1989,项目名称:PoC,代码行数:32,代码来源:PoC.py

示例2: print

# 需要导入模块: from lib.Functions import Exit [as 别名]
# 或者: from lib.Functions.Exit import printThisIsNoLibraryFile [as 别名]
        from configparser import Error

        print(Fore.RED + "ERROR:" + Fore.RESET + " %s" % ex.message)
        if isinstance(ex.__cause__, FileNotFoundError):
            print(Fore.YELLOW + "  FileNotFound:" + Fore.RESET + " '%s'" % str(ex.__cause__))
        elif isinstance(ex.__cause__, Error):
            print(Fore.YELLOW + "  configparser.Error:" + Fore.RESET + " %s" % str(ex.__cause__))
        print(Fore.RESET + Back.RESET + Style.RESET_ALL)
        exit(1)

    except EnvironmentException as ex:
        Exit.printEnvironmentException(ex)
    except NotConfiguredException as ex:
        Exit.printNotConfiguredException(ex)
    except PlatformNotSupportedException as ex:
        Exit.printPlatformNotSupportedException(ex)
    except BaseException as ex:
        Exit.printBaseException(ex)
    except NotImplementedException as ex:
        Exit.printNotImplementedException(ex)
    except Exception as ex:
        Exit.printException(ex)


# entry point
if __name__ == "__main__":
    Exit.versionCheck((3, 4, 0))
    main()
else:
    Exit.printThisIsNoLibraryFile(Testbench.headLine)
开发者ID:hoangt,项目名称:PoC,代码行数:32,代码来源:Testbench.py

示例3: elif

# 需要导入模块: from lib.Functions import Exit [as 别名]
# 或者: from lib.Functions.Exit import printThisIsNoLibraryFile [as 别名]
		elif (args.xst is not None):
			netList.xstCompilation(args.xst, args.showLog, args.showReport, deviceString=args.device, boardString=args.board)
		else:
			argParser.print_help()
		
	except CompilerException as ex:
		from colorama import Fore, Back, Style
		from configparser import Error
		
		print(Fore.RED + "ERROR:" + Fore.RESET + " %s" % ex.message)
		if isinstance(ex.__cause__, FileNotFoundError):
			print(Fore.YELLOW + "  FileNotFound:" + Fore.RESET + " '%s'" % str(ex.__cause__))
		elif isinstance(ex.__cause__, Error):
			print(Fore.YELLOW + "  configparser.Error:" + Fore.RESET + " %s" % str(ex.__cause__))
		print(Fore.RESET + Back.RESET + Style.RESET_ALL)
		exit(1)
		
	except EnvironmentException as ex:					Exit.printEnvironmentException(ex)
	except NotConfiguredException as ex:				Exit.printNotConfiguredException(ex)
	except PlatformNotSupportedException as ex:	Exit.printPlatformNotSupportedException(ex)
	except BaseException as ex:									Exit.printBaseException(ex)
	except NotImplementedException as ex:				Exit.printNotImplementedException(ex)
	except Exception as ex:											Exit.printException(ex)
			
# entry point
if __name__ == "__main__":
	Exit.versionCheck((3,4,0))
	main()
else:
	Exit.printThisIsNoLibraryFile(Netlist.headLine)
开发者ID:hoangt,项目名称:PoC,代码行数:32,代码来源:Netlist.py

示例4: exit

# 需要导入模块: from lib.Functions import Exit [as 别名]
# 或者: from lib.Functions.Exit import printThisIsNoLibraryFile [as 别名]
			exit(0)
		else:
			print(Fore.MAGENTA + "=" * 80)
			print("{: ^80s}".format(Configuration.headLine))
			print("=" * 80)
			print(Fore.RESET + Back.RESET + Style.RESET_ALL)
		
			argParser.print_help()
			exit(0)
	
#	except ConfiguratorException as ex:
#		from colorama import Fore, Back, Style
#		print(Fore.RED + "ERROR:" + Fore.RESET + " %s" % ex.message)
#		if isinstance(ex.__cause__, FileNotFoundError):
#			print(Fore.YELLOW + "  FileNotFound:" + Fore.RESET + " '%s'" % str(ex.__cause__))
#		print(Fore.RESET + Back.RESET + Style.RESET_ALL)
#		exit(1)
		
	except NotConfiguredException as ex:				Exit.printNotConfiguredException(ex)
	except PlatformNotSupportedException as ex:	Exit.printPlatformNotSupportedException(ex)
	except BaseException as ex:									Exit.printBaseException(ex)
	except NotImplementedException as ex:				Exit.printNotImplementedException(ex)
	except Exception as ex:											Exit.printException(ex)
			
# entry point
if __name__ == "__main__":
	Exit.versionCheck((3,4,0))
	main()
else:
	Exit.printThisIsNoLibraryFile(Configuration.headLine)
开发者ID:hoangt,项目名称:PoC,代码行数:32,代码来源:Configuration.py


注:本文中的lib.Functions.Exit.printThisIsNoLibraryFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。