original_docstring: Safety handler to verify file-like objects
docstring: Safety handler to verify file-like objects
docstring_tokens: Safety handler to verify file - like objects
code: def __getFileObj(self, f):
          """Safety handler to verify file-like objects"""
          if not f:
              raise ShapefileException("No file-like object available.")
          elif hasattr(f, "write"):
              return f
          else:
              pth = os.path.split(f)[0]
              if pth and not os.path.exists(pth):
                  os.makedirs(pth)
              return open(f, "wb+")
code_tokens: def __getFileObj ( self , f ) : if not f : raise ShapefileException ( "No file-like object available." ) elif hasattr ( f , "write" ) : return f else : pth = os . path . split ( f ) [ 0 ] if pth and not os . path . exists ( pth ) : os . makedirs ( pth ) return open ( f , "wb+" )
short_docstring: Safety handler to verify file-like objects
short_docstring_tokens: Safety handler to verify file - like objects
comment: """Safety handler to verify file-like objects"""