Source

callchain / callchain / chainlet / imps.py

Full commit
# -*- coding: utf-8 -*-
'''callchain services imports'''

from stuf.six import PY3

if PY3:
    from plistlib import (
        readPlistFromBytes as plist_loads, writePlistToBytes as plist_dumps) # @UnresolvedImport @UnusedImport @IgnorePep8
    from queue import PriorityQueue, Queue, Empty  # @UnusedImport @Reimport @IgnorePep8 @UnresolvedImport
else:
    from Queue import PriorityQueue, Queue, Empty  # @UnusedImport @Reimport @IgnorePep8
    from plistlib import (
        readPlistFromString as plist_loads, writePlistToString as plist_dumps)  # @UnusedImport @Reimport @IgnorePep8
from stuf.six.moves import (
    StringIO, pickle, parse_qs, urlencode, xrange, xmlrpc, xrange)  # @UnresolvedImport @UnusedImport @IgnorePep8
try:
    import yaml
except ImportError:
    pass
try:
    import simplejson as json
except ImportError:
    import json
try:
    from bencode import bdecode, bencode
except ImportError:
    pass
try:
    from lxml import etree
except ImportError:
    import xml.etree.ElementTree as etree
try:
    import msgpack
except ImportError:
    pass
try:
    import tnetstring
except ImportError:
    pass
try:
    import thrift.TSerialization as thrift
except ImportError:
    pass
try:
    import bson
except ImportError:
    pass
try:
    import jsonpickle
except ImportError:
    pass
try:
    import netstring
except ImportError:
    pass
try:
    import html
except ImportError:
    pass
try:
    from requests.packages.urllib3.filepost import encode_multipart_formdata
except ImportError:
    try:
        from urllib3.filepost import encode_multipart_formdata
    except ImportError:
        pass
try:
    import xlwt
    import xlrd
except ImportError:
    pass