Пример #1
0
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
def gettweepy():
    try: mod = _import("tweepy")
    except: mod = _import("tl.contrib.tweepy")
    logging.info("tweepy module is %s" % str(mod))
    return mod
Пример #3
0
def getxmpp():
    try: mod = _import("xmpp")
    except: mod = _import("tl.contrib.sleekxmpp")
    logging.debug("xmpp module is %s" % str(mod))
    return mod
Пример #4
0
def getBeautifulSoup():
    try: mod = _import("BeautifulSoup")
    except: mod = _import("tl.contrib.bs4")
    logging.debug("BeautifulSoup module is %s" % str(mod))
    return mod
Пример #5
0
def getrequests():
    try: mod = _import("requests")
    except: mod = None
    logging.debug("requests module is %s" % str(mod))
    return mod
Пример #6
0
def getoauth():
    try: mod = _import("oauth")
    except:
        mod = _import("tl.contrib.oauth")
    logging.debug("oauth module is %s" % str(mod))
    return mod
Пример #7
0
def getfeedparser():
    try: mod = _import("feedparser")
    except: mod = _import("tl.contrib.feedparser")
    logging.debug("feedparser module is %s" % str(mod))
    return mod
Пример #8
0
def getjson():
    mod = _import("json")
    logging.debug("json module is %s" % str(mod))
    return mod