parameters: (self, s, dir=False)
docstring: turns directory separators into dots and removes the ".py*" extension
              so the string can be used as import statement
docstring_summary: turns directory separators into dots and removes the ".py*" extension
              so the string can be used as import statement
docstring_tokens: turns directory separators into dots and removes the . py * extension so the string can be used as import statement
function: def __importify(self, s, dir=False):
          """ turns directory separators into dots and removes the ".py*" extension
              so the string can be used as import statement """
          if not dir:
              dirname, fname = os.path.split(s)
  
              if fname.count('.') > 1:
                  #if there's a file named xxx.xx.py, it is not a valid module, so, let's not load it...
                  return
  
              imp_stmt_pieces = [dirname.replace("\\", "/").replace("/", "."), os.path.splitext(fname)[0]]
  
              if len(imp_stmt_pieces[0]) == 0:
                  imp_stmt_pieces = imp_stmt_pieces[1:]
  
              return ".".join(imp_stmt_pieces)
  
          else:  #handle dir
              return s.replace("\\", "/").replace("/", ".")
function_tokens: def __importify ( self , s , dir = False ) : if not dir : dirname , fname = os . path . split ( s ) if fname . count ( '.' ) > 1 : #if there's a file named xxx.xx.py, it is not a valid module, so, let's not load it... return imp_stmt_pieces = [ dirname . replace ( "\\" , "/" ) . replace ( "/" , "." ) , os . path . splitext ( fname ) [ 0 ] ] if len ( imp_stmt_pieces [ 0 ] ) == 0 : imp_stmt_pieces = imp_stmt_pieces [ 1 : ] return "." . join ( imp_stmt_pieces ) else : #handle dir return s . replace ( "\\" , "/" ) . replace ( "/" , "." )