forked from shotgunsoftware/python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsg_25.py
More file actions
25 lines (22 loc) · 793 Bytes
/
Copy pathsg_25.py
File metadata and controls
25 lines (22 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import sys
import os
import logging
from .lib.httplib2 import Http, ProxyInfo, socks
from .lib.sgtimezone import SgTimezone
from .lib.xmlrpclib import Error, ProtocolError, ResponseError
LOG = logging.getLogger("shotgun_api3")
LOG.setLevel(logging.WARN)
try:
import simplejson as json
except ImportError:
LOG.debug("simplejson not found, dropping back to json")
try:
import json as json
except ImportError:
LOG.debug("json not found, dropping back to embedded simplejson")
# We need to munge the path so that the absolute imports in simplejson will work.
dir_path = os.path.dirname(__file__)
lib_path = os.path.join(dir_path, 'lib')
sys.path.append(lib_path)
from .lib import simplejson as json
sys.path.pop()