Beispiel #1
0
def open_gconf_application(key):
    """ Get the name from gconf and open the application. """
    specto_gconf = Specto_gconf(key)
    application = specto_gconf.get_entry("command")
    if "mailto" in key:
        application = application.replace(" %s", "")#this is an ugly hack, because evolution really doesn't want to startup with %s
    os.system(application + " &")
Beispiel #2
0
from spectlib.logger import Logger
from spectlib.specto_gconf import Specto_gconf
from spectlib.i18n import _
from spectlib.import_export import Import_watch
from spectlib import networkmanager as conmgr

#for the initial ping test
from urllib2 import urlopen
from time import sleep
import time
import thread

#create a gconf object
specto_gconf = Specto_gconf("/apps/specto")

if specto_gconf.get_entry("debug_mode") == True:
    DEBUG = True
elif specto_gconf.get_entry("debug_mode") == False:
    DEBUG = False
else:
    DEBUG = False

try:
    import pygtk
    pygtk.require("2.0")
    import gtk
    import gtk.glade
except:
    print _("no GTK, activating console mode")
    GTK = False
else:
Beispiel #3
0
def show_webpage(webpage):
    """ Open the webpage in the default browser. """
    specto_gconf = Specto_gconf("/desktop/gnome/url-handlers/http")
    default_browser = specto_gconf.get_entry("command")
    clean_url = str(webpage.replace("&", "\&"))
    os.system((default_browser % clean_url) + " &") #open the browser with the page
Beispiel #4
0
from spectlib.logger import Logger
from spectlib.specto_gconf import Specto_gconf
from spectlib.i18n import _
from spectlib.import_export import Import_watch
from spectlib import networkmanager as conmgr

#for the initial ping test
from urllib2 import urlopen
from time import sleep
import time
import thread

#create a gconf object
specto_gconf = Specto_gconf("/apps/specto")

if specto_gconf.get_entry("debug_mode")==True:
    DEBUG = True
elif specto_gconf.get_entry("debug_mode")==False:
    DEBUG = False
else:
    DEBUG = False

try:
    import pygtk
    pygtk.require("2.0")
    import gtk
    import gtk.glade
except:
    print _("no GTK, activating console mode")
    GTK = False
else: