本文整理汇总了Python中process.Process.get_LineCount方法的典型用法代码示例。如果您正苦于以下问题:Python Process.get_LineCount方法的具体用法?Python Process.get_LineCount怎么用?Python Process.get_LineCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类process.Process
的用法示例。
在下文中一共展示了Process.get_LineCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Demonstrator
# 需要导入模块: from process import Process [as 别名]
# 或者: from process.Process import get_LineCount [as 别名]
class Demonstrator():
''' Runs both files in one go process and filereader '''
def __init__(self,filename):
self.process = Process() # Creats an object
self.reader = FileReader(filename,self.process) # Creates an object
self.reader.run() # call the run method
self.process.workOut()
def newFile(self,filename):
'''Ressets object and run the object again'''
self.process.reset() #resets objects
self.reader.FileReader(filename,self.process)
self.reader.run()
def displayResults(self):
'''Display the object result'''
print (self.process.showAnswer())
def displayQ1(self): return '%0.2f'% (self.process.get_Length()) # To get the value
def displayQ2(self): return '%0.2f%%'% (self.process.get_Mark()) # for GUIs
def displayQ3(self): return '%0.2f%%'% (self.process.get_Action())
def displayQ4(self): return '%0.2f'% (self.process.get_Count())
def displayQ5(self): return '%d'% (self.process.get_Match())
def displayQ6(self): return '%0.2f%%'% (self.process.get_Tree())
def displayQ7(self): return '%d'% (self.process.get_LineCount())