예제 #1
0
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

from amsn2.core import aMSNUserInterfaceManager
import sys
import traceback


# Here we load the actual front end.
# We need to import the front end module and return it
# so the guimanager can access its classes
def load():
    try:
        import qt4
        return qt4
    except ImportError, e:
        etype, value, tb = sys.exc_info()
        traceback.print_exception(etype, value, tb.tb_next)
        return None


# Initialize the front end by checking for any
# dependency then register it to the guimanager
try:
    #import imp                  #Don't do that. imp.find_module() can't work with any packager (py2exe and family)
    #imp.find_module("PyQt4")    #so it will fail. Instead just try to import directy.
    import PyQt4
    aMSNUserInterfaceManager.register_frontend("qt4", sys.modules[__name__])
except ImportError:
    pass
예제 #2
0
파일: __init__.py 프로젝트: 19MiRkO91/amsn2
from amsn2.core import aMSNUserInterfaceManager
import sys
import traceback

# Here we load the actual front end.
# We need to import the front end module and return it
# so the guimanager can access its classes
def load():
    try:
        import gtk_
    except ImportError, e:
        etype, value, tb = sys.exc_info()
        traceback.print_exception(etype, value, tb.tb_next)
        return None
    return gtk_

# Initialize the front end by checking for any
# dependency then register it to the guimanager
try:
    #import imp                  #Don't do that. imp.find_module() can't work with any packager (py2exe and family)
    #imp.find_module("gtk")      #so it will fail. Instead just try to import directy.
    import gtk
    aMSNUserInterfaceManager.register_frontend("gtk", sys.modules[__name__])

except ImportError:
    pass