示例#1
0
def main():
    # stupid test
    a = QtGui.QApplication([])
    b = QtGui.QPushButton("Say hello", None)
    g.procs.add(['ls', '/tmp'])
    g.procs.add(['ls', '-la'])
    #a.setMainWidget(b)
    b.show()
    a.exec_()
示例#2
0
            c,v = r
            for p in c.all_unique_positions():
                if p.v is v:
                    return c,p.copy()
        g.es_print("Not in gnx cache, slow!")
        for c,p in self.all_positions_global():
            if p.gnx == gnx:
                return c,p.copy()
        return None,None

    #@+node:ekr.20140920041848.17935: *3* update_new_cs
    def update_new_cs(self):

        for c in g.app.commanders():
            if c.hash() not in self.cs:
                for p in c.all_unique_positions():
                    k = p.gnx
                    self.ps[k] = c, p.v
                self.cs.add(c.hash())
    #@-others
#@-others

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    bd = GlobalSearch()
    sys.exit(app.exec_())

#@@language python
#@@tabwidth -4
#@-leo