本文整理汇总了Python中utils.globals.GlobalData.version方法的典型用法代码示例。如果您正苦于以下问题:Python GlobalData.version方法的具体用法?Python GlobalData.version怎么用?Python GlobalData.version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.globals.GlobalData
的用法示例。
在下文中一共展示了GlobalData.version方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: codimensionMain
# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import version [as 别名]
def codimensionMain():
""" The codimension driver """
# Parse command line arguments
parser = OptionParser(
"""
%prog [options] [project file | python files]
Runs codimension UI
""",
version = "%prog " + __version__ )
parser.add_option( "--debug",
action="store_true", dest="debug", default=False,
help="switch on debug and info messages (default: Off)" )
parser.add_option( "--clean-start",
action="store_true", dest="cleanStart", default=False,
help="do not restore previous IDE state (default: Off)" )
options, args = parser.parse_args()
# Configure logging
setupLogging( options.debug )
# The default exception handler can be replaced
sys.excepthook = exceptionHook
# Create global data singleton.
# It's unlikely to throw any exceptions.
globalData = GlobalData()
globalData.version = __version__
# Loading settings - they have to be loaded before the application is
# created. This is because the skin name is saved there.
settings = Settings()
copySkin()
# Load the skin
globalData.skin = Skin()
globalData.skin.load( settingsDir + "skins" +
os.path.sep + settings.skin )
# QT on UBUNTU has a bug - the main menu bar does not generate the
# 'aboutToHide' signal (though 'aboutToShow' is generated properly. This
# prevents codimension working properly so this hack below disables the
# global menu bar for codimension and makes it working properly.
os.environ[ "QT_X11_NO_NATIVE_MENUBAR" ] = "1"
# Create QT application
codimensionApp = CodimensionApplication( sys.argv, settings.style )
globalData.application = codimensionApp
logging.debug( "Starting codimension v." + __version__ )
try:
# Process command line arguments
projectFile = processCommandLineArgs( args )
except Exception, exc:
logging.error( str( exc ) )
parser.print_help()
return 1