本文整理汇总了Python中easyprocess.EasyProcess.split方法的典型用法代码示例。如果您正苦于以下问题:Python EasyProcess.split方法的具体用法?Python EasyProcess.split怎么用?Python EasyProcess.split使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类easyprocess.EasyProcess
的用法示例。
在下文中一共展示了EasyProcess.split方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate
# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import split [as 别名]
def generate():
#get the query
if request.method == 'POST':
query = request.form['query']
else:
query = request.args.get('query')
query = query.replace("\"","\\\"")
command = "java -jar g.jar -qs \""+query+"\""
command_results = EasyProcess(command).call().stdout
result = command_results.split("RDF Output:")[1]
return str(result)
示例2: BIND
# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import split [as 别名]
from easyprocess import EasyProcess
query = '''BASE <http://example.org/> PREFIX rqg-ite: <http://w3id.org/sparql-generate/ite/> PREFIX rqg-fn: <http://w3id.org/sparql-generate/fn/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> GENERATE { [] rdfs:label ?body . } SOURCE <http://www.pdfconvertonline.com/htm-to-jpg-online.html> AS ?source ITERATOR rqg-ite:CSSPath(?source, "title") AS ?body WHERE { BIND(rqg-fn:HTMLTag(?body, "title") AS ?title ) }'''
query = query.replace("\"","\\\"")
command = "java -jar g.jar -qs \""+query+"\""
command_results = EasyProcess(command).call().stdout
print command_results.split("RDF Output:")[1]