summaryrefslogtreecommitdiff
path: root/portato.py
diff options
context:
space:
mode:
authornecoro <>2007-01-24 22:15:27 +0000
committernecoro <>2007-01-24 22:15:27 +0000
commit3a1d0db1f30133bae568341428d427cf5a5d0495 (patch)
treef9d77762827ab71dea40d9d78513806da1fcc7fc /portato.py
parentc7e0ba131ab7169573dc0278f4ea3b19c13e9e26 (diff)
downloadportato-3a1d0db1f30133bae568341428d427cf5a5d0495.tar.gz
portato-3a1d0db1f30133bae568341428d427cf5a5d0495.tar.bz2
portato-3a1d0db1f30133bae568341428d427cf5a5d0495.zip
- Added icons
- Added support for killing the process - Reorganised setup and starting-script
Diffstat (limited to '')
-rwxr-xr-xportato.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/portato.py b/portato.py
index 1f77354..65cee2c 100755
--- a/portato.py
+++ b/portato.py
@@ -12,12 +12,12 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from portato.constants import VERSION
+from portato.constants import VERSION, FRONTENDS, STD_FRONTEND
import sys
if __name__ == "__main__":
- uimod = "gtk"
+ uimod = STD_FRONTEND
if len(sys.argv) > 1:
if sys.argv[1] in ("--help","--version","-h","-v"):
@@ -30,13 +30,17 @@ There is NO WARRANTY, to the extent permitted by law.
Written by René 'Necoro' Neumann <necoro@necoro.net>""" % VERSION
else:
uimod = sys.argv[1]
-
- if uimod == "gtk":
- from portato.gui.gtk import run
- elif uimod == "curses":
- from portato.gui.curses import run
+ if uimod in FRONTENDS:
+ try:
+ exec ("from portato.gui.%s import run" % uimod)
+ except ImportError:
+ print "'%s' should be installed, but cannot be imported. This is definitly a bug." % uimod
+ sys.exit(1)
else:
- print "Unknown interface %s. Correct interfaces are: gtk, curses" % uimod
+ print ("Unknown interface '%s'. Correct interfaces are:" % uimod) ,
+ for u in FRONTENDS:
+ print u ,
+ print
sys.exit(1)
run()
é 'Necoro' Neumann2-3/+3 2020-04-19SELECT is not necessary for most operations -- skip itRené 'Necoro' Neumann2-12/+1 2020-04-19Store path as array -- the delimiter is not always '.'René 'Necoro' Neumann3-36/+44 2020-04-19Split client part to client.goRené 'Necoro' Neumann2-125/+137 2020-04-19IMAP: Create foldersRené 'Necoro' Neumann1-4/+38 2020-04-19Improved IMAPRené 'Necoro' Neumann1-3/+88 2020-04-19Started IMAP connectionRené 'Necoro' Neumann4-0/+152 2020-04-19Use our own logger for debug for convenience sakeRené 'Necoro' Neumann1-2/+3 2020-04-19Fix debug logging m(René 'Necoro' Neumann1-2/+2 2020-04-19Rename util.go to log.go. Add verbose modeRené 'Necoro' Neumann4-24/+54 2020-04-19Clean go.modRené 'Necoro' Neumann2-3/+0 2020-04-19Do not print the parsedCfg anymoreRené 'Necoro' Neumann1-1/+1 2020-04-19Increase go-version to 1.14René 'Necoro' Neumann1-2/+2 2020-04-19CI: go vetRené 'Necoro' Neumann1-0/+3 2020-04-19Fetching and parsing the feedsRené 'Necoro' Neumann5-4/+113 2020-04-19Ignore all config*.ymlRené 'Necoro' Neumann1-1/+1