How to use the leo.core.leoGlobals.pr function in leo

To help you get started, we’ve selected a few leo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leo-editor / leo-editor / leo / plugins / qt_gui.py View on Github external
def destroySelf(self):

        QtCore.pyqtRemoveInputHook()
        if 'shutdown' in g.app.debug:
            g.pr('LeoQtGui.destroySelf: calling qtApp.Quit')
        self.qtApp.quit()
    #@+node:ekr.20110605121601.18485: *3* qt_gui.Clipboard
github leo-editor / leo-editor / leo / core / leoPlugins.py View on Github external
def plugin_signon(self, module_name, verbose=False):
        '''Print the plugin signon.'''
        # This is called from as the result of the imports
        # in self.loadOnePlugin
        m = self.signonModule
        if verbose:
            g.es('', "...%s.py v%s: %s" % (
                m.__name__, m.__version__, g.plugin_date(m)))
            g.pr(m.__name__, m.__version__)
        self.signonModule = None # Prevent double signons.
    #@+node:ekr.20100908125007.6030: *4* plugins.unloadOnePlugin
github leo-editor / leo-editor / leo / plugins / importers / basescanner.py View on Github external
def oops(self):
        g.pr('BaseScanner oops: %s must be overridden in subclass' % g.callers())
github leo-editor / leo-editor / leo / core / leoGtkTree.py View on Github external
def dumpWidgetList (self,tag):

        g.pr("\ncheckWidgetList: %s" % tag)

        for w in self.visibleText:

            p = w.leo_position
            if p:
                s = w.getAllText().strip()
                h = p.headString().strip()

                addr = self.textAddr(w)
                g.pr("p:",addr,h)
                if h != s:
                    g.pr("w:",'*' * len(addr),s)
            else:
                g.pr("w.leo_position == None",w)
    #@-node:ekr.20080112145409.381:dumpWidgetList
github leo-editor / leo-editor / leo / plugins / open_with.py View on Github external
def doOpenWithSettings (aList):

    '''Create an open-with table from a list of dictionaries.'''

    table = []
    for z in aList:
        command = z.get('command')
        name = z.get('name')
        shortcut = z.get('shortcut')
        try:
            data = eval(command)
            if 0:
                g.pr(name,shortcut)
                for i in range(len(data)):
                    g.pr(i,repr(data[i]))
                g.pr('')
            entry = name,shortcut,data
            table.append(entry)

        except SyntaxError:
            g.pr(g.es_exception())
            return None

    return table
#@+node:ekr.20070411165142.2: *3* doSubprocessTable
github leo-editor / leo-editor / leo / core / leoGtkMenu.py View on Github external
def oops (self):

        g.pr("leoMenu oops:", g.callers(2), "should be overridden in subclass")
    #@nonl
github leo-editor / leo-editor / leo / plugins / threading_colorizer.py View on Github external
def report(kind,tag):
            i,j,name = tag
            g.pr('computeNewTags: *** %-5s %10s %3d %3d' % (kind,name,i,j),repr(self.s[i:j]))
github leo-editor / leo-editor / leo / core / leoGtkGui.py View on Github external
def runMainLoop(self):

        '''Start the gtk main loop.'''

        if self.script:
            log = g.app.log
            if log:
                g.pr('Start of batch script...\n')
                log.c.executeScript(script=self.script)
                g.pr('End of batch script')
            else:
                g.pr('no log, no commander for executeScript in gtkGui.runMainLoop')
        else:
            gtk.main()
    #@-node:ekr.20080112145409.440:runMainLoop (gtkGui)
github leo-editor / leo-editor / leo / core / leoFrame.py View on Github external
def oops(self):
        g.pr("LeoFrame oops:", g.callers(4), "should be overridden in subclass")
    #@+node:ekr.20031218072017.3692: *4* LeoFrame.promptForSave
github leo-editor / leo-editor / leo / plugins / toolbar.py View on Github external
def commandCallback():
                g.pr("command for widget %s" % self)