コード例 #1
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def gettornado():
    try:
        mod = _import("tornado")
        if not "site-packages" in str(mod): mod = _import("tl.contrib.tornado")
    except: mod = _import("tl.contrib.tornado")
    logging.debug("tornado module is %s" % str(mod))
    return mod
コード例 #2
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def gettweepy():
    try: mod = _import("tweepy")
    except: mod = _import("tl.contrib.tweepy")
    logging.info("tweepy module is %s" % str(mod))
    return mod
コード例 #3
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getxmpp():
    try: mod = _import("xmpp")
    except: mod = _import("tl.contrib.sleekxmpp")
    logging.debug("xmpp module is %s" % str(mod))
    return mod
コード例 #4
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getBeautifulSoup():
    try: mod = _import("BeautifulSoup")
    except: mod = _import("tl.contrib.bs4")
    logging.debug("BeautifulSoup module is %s" % str(mod))
    return mod
コード例 #5
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getrequests():
    try: mod = _import("requests")
    except: mod = None
    logging.debug("requests module is %s" % str(mod))
    return mod
コード例 #6
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getoauth():
    try: mod = _import("oauth")
    except:
        mod = _import("tl.contrib.oauth")
    logging.debug("oauth module is %s" % str(mod))
    return mod
コード例 #7
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getfeedparser():
    try: mod = _import("feedparser")
    except: mod = _import("tl.contrib.feedparser")
    logging.debug("feedparser module is %s" % str(mod))
    return mod
コード例 #8
0
ファイル: imports.py プロジェクト: buzzworkers/tl
def getjson():
    mod = _import("json")
    logging.debug("json module is %s" % str(mod))
    return mod