class_docstr: The main 'connection' object for PickleShare database 
class_docstr_tok: ["The","main","'connection","'","object","for","PickleShare","database"]
docstr: Return a db object that will manage the specied directory
docstr_tok: ["Return","a","db","object","that","will","manage","the","specied","directory"]
code: def __init__(self, root):
      """Return a db object that will manage the specied directory"""
      if not isinstance(root, string_types):
          root = str(root)
      root = os.path.abspath(os.path.expanduser(root))
      self.root = Path(root)
      if not self.root.is_dir():
          # catching the exception is necessary if multiple processes are concurrently trying to create a folder
          # exists_ok keyword argument of mkdir does the same but only from Python 3.5
          try:
              self.root.mkdir(parents=True)
          except OSError as e:
              if e.errno != errno.EEXIST:
                  raise
      # cache has { 'key' : (obj, orig_mod_time) }
      self.cache = {}
  
imports: from __future__ import print_function
  import os, stat, time
  import errno
  import sys
label_desc: Use image node_id 1 to create a new PickleShareDB object from inherited base classes: collections_abc with example: obj = PickleShareDB(root)