本文整理汇总了Python中PySide.QtCore.QCoreApplication.applicationDirPath方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.applicationDirPath方法的具体用法?Python QCoreApplication.applicationDirPath怎么用?Python QCoreApplication.applicationDirPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore.QCoreApplication
的用法示例。
在下文中一共展示了QCoreApplication.applicationDirPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: import
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import applicationDirPath [as 别名]
# the GNU General Public License for more details.
import os
import platform
import stat
import sys
from PySide.QtCore import (QCoreApplication, QProcess)
__version__ = '1.0.3'
if sys.platform.startswith("win"):
PATH = os.path.join(os.path.dirname(sys.executable),
"Lib/site-packages/PySide/bin")
else:
app = QCoreApplication([])
PATH = unicode(app.applicationDirPath())
del app
PYUIC4 = os.path.join(PATH, "pyside-uic") # e.g. PYUIC4 = "/usr/bin/pyuic4"
PYRCC4 = os.path.join(PATH, "pyside-rcc")
PYLUPDATE4 = os.path.join(PATH, "pyside-lupdate")
LRELEASE = "lrelease"
if platform.system() == "Windows":
PYUIC4 = PYUIC4.replace("/", "\\") + ".bat"
PYRCC4 = PYRCC4.replace("/", "\\") + ".exe"
PYLUPDATE4 = PYLUPDATE4.replace("/", "\\") + ".exe"
msg = []
if not os.access(PYUIC4, os.F_OK):
msg.append("failed to find pyside-uic; tried %s" % PYUIC4)
if not os.access(PYRCC4, os.F_OK):
msg.append("failed to find pyside-rcc; tried %s" % PYRCC4)