Esempio n. 1
0
def main(application):
    import sys

    from shtoom.ui.util import maybeInstallDBus
    maybeInstallDBus()

    from twisted.internet import reactor
    from __main__ import app

    from shtoom.ui.textui import ShtoomMain
    UI = ShtoomMain()
    UI.connectApplication(application)
    # see twisted.conch.stdio for an example of readline-y sort of things.
    stdio.StandardIO(UI)
    if not app.getPref('logfile'):
        from shtoom import log
        log.startLogging(sys.stdout, setStdout=False)
    return UI
Esempio n. 2
0
def main(application):
    import sys

    from shtoom.ui.util import maybeInstallDBus
    maybeInstallDBus()

    from twisted.internet import reactor
    from __main__ import app

    from shtoom.ui.textui import ShtoomMain
    UI = ShtoomMain()
    UI.connectApplication(application)
    # see twisted.conch.stdio for an example of readline-y sort of things.
    stdio.StandardIO(UI)
    if not app.getPref('logfile'):
        from shtoom import log
        log.startLogging(sys.stdout, setStdout=False)
    return UI
Esempio n. 3
0
def main(application):
    import sys
    from shtoom.ui.util import maybeInstallDBus
    maybeInstallDBus()

    from twisted.internet import reactor
    from twisted.internet import tksupport

    from shtoom.ui.tkui import ShtoomMainWindow
    UI = ShtoomMainWindow()
    tksupport.install(UI.getMain())
    UI.connectApplication(application)
    from shtoom import log
    if application.getPref('stdout'):
        import sys
        log.startLogging(sys.stdout, setStdout=False)
    else:
        log.startLogging(UI.getLogger(), setStdout=False)
    return UI