本文整理汇总了Python中Console.interface方法的典型用法代码示例。如果您正苦于以下问题:Python Console.interface方法的具体用法?Python Console.interface怎么用?Python Console.interface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console.interface方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: interfaceConsole
# 需要导入模块: import Console [as 别名]
# 或者: from Console import interface [as 别名]
def interfaceConsole(self):
"""
Some Comment
"""
lat = self.lat
lng = self.lng
zoom = self.zoom
size = self.size
if myFrame.infile is None:
tkMessageBox.showwarning("Open file", "Please Choose A KML file to Open")
infile = self.onOpen()
else:
infile = myFrame.infile
if myFrame.outfile is None:
tkMessageBox.showwarning("Write KML file", "Please Choose A KML file to write to")
outfile = self.saveFileKML()
else:
outfile = myFrame.outfile
if myFrame.outimage is None:
tkMessageBox.showwarning("Write Img file", "Please Choose an image file to write to")
outimage = self.saveFileImg()
else:
outimage = myFrame.outimage
# if ' ' in infile: infile = '"'+infile+'"'
# if ' ' in outimage: outimage = '"'+outimage+'"'
# if ' ' in outfile: outfile = '"'+outfile+'"'
sampleLine = """-wa -w {} -m {} -v -z {} -c {},{} -s {} {}""".format(outfile,
outimage, repr(zoom), repr(lat), repr(lng), repr(size), infile)
args = ['-wa', '-w', outfile, '-m', outimage, '-v', '-z', repr(zoom),
'-c', repr(lat)+','+ repr(lng), '-s', repr(size), infile]
if self.if_extract:
args = ['-h'] + args
# disable run button, to disallow too many running applications
self.run.config(state=DISABLED)
self.wd = waitDialog.WaitDialog(350, 100, myFrame.outimage)
self.wd.activate()
uiobserver = UiObserver(self)
imobserver = WaitObserver(self.wd)
urlobserver = WaitObserver(self.wd)
Console.interface(args, uiobserver, imobserver, urlobserver)
self.wd.end()
self.log("FINISHED", "\n" + str(self.div_string[0] * ((self.div_string[1]/len(self.div_string[0]))+1))[:self.div_string[1]] + "\n\n")
self.run.config(state=NORMAL)