当前位置: 首页>>代码示例>>Python>>正文


Python Console.interface方法代码示例

本文整理汇总了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)
开发者ID:Willowlark,项目名称:KML-Optimizer-Pathfinder,代码行数:51,代码来源:UI.py


注:本文中的Console.interface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。