Use phantom.scriptName instead of phantom.args[0]

This commit is contained in:
IceArmy
2011-06-15 14:30:31 -07:00
parent fb99a4868d
commit 61459fab45
4 changed files with 12 additions and 3 deletions
+4
View File
@@ -130,6 +130,10 @@ class Phantom(QObject):
def scriptLookupDir(self, dirPath):
self.m_page.scriptLookupDir = dirPath
@pyqtProperty(str)
def scriptName(self):
return os.path.basename(self.m_scriptFile)
@pyqtProperty('QVariantMap')
def version(self):
version = {
-2
View File
@@ -77,8 +77,6 @@ def parseArgs(args):
if not os.path.exists(args.script):
sys.exit('No such file or directory: \'%s\'' % args.script)
args.script_args.insert(0, os.path.basename(args.script))
return args