本文整理匯總了Python中Ophis.Frontend.parse_file方法的典型用法代碼示例。如果您正苦於以下問題:Python Frontend.parse_file方法的具體用法?Python Frontend.parse_file怎麽用?Python Frontend.parse_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Ophis.Frontend
的用法示例。
在下文中一共展示了Frontend.parse_file方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: pragmaRequire
# 需要導入模塊: from Ophis import Frontend [as 別名]
# 或者: from Ophis.Frontend import parse_file [as 別名]
def pragmaRequire(ppt, line, result):
"Includes a source file at most one time"
filename = str(os.path.dirname(sys.argv[1])) + os.sep + line.expect("STRING").value
line.expect("EOL")
if type(filename)==str:
global loadedfiles
if filename not in loadedfiles:
loadedfiles[filename]=1
result.append(FE.parse_file(ppt,filename))
示例2: pragmaRequire
# 需要導入模塊: from Ophis import Frontend [as 別名]
# 或者: from Ophis.Frontend import parse_file [as 別名]
def pragmaRequire(ppt, line, result):
"Includes a source file at most one time"
filename = line.expect("STRING").value
line.expect("EOL")
if type(filename) == str:
result.append(FE.parse_file(ppt, filename, True))
示例3: pragmaInclude
# 需要導入模塊: from Ophis import Frontend [as 別名]
# 或者: from Ophis.Frontend import parse_file [as 別名]
def pragmaInclude(ppt, line, result):
"Includes a source file"
filename = line.expect("STRING").value
line.expect("EOL")
if type(filename) == str:
result.append(FE.parse_file(ppt, filename))
示例4: pragmaInclude
# 需要導入模塊: from Ophis import Frontend [as 別名]
# 或者: from Ophis.Frontend import parse_file [as 別名]
def pragmaInclude(ppt, line, result):
"Includes a source file"
filename = str(os.path.dirname(sys.argv[1])) + os.sep + line.expect("STRING").value
line.expect("EOL")
if type(filename)==str: result.append(FE.parse_file(ppt,filename))