code: def _get_src_file(self, val, default='Unknown'):
          '''
          return the source file path
  
          since -- 7-19-12
  
          val -- mixed -- the value whose path you want
  
          return -- string -- the path, or something like 'Unknown' if you can't find the path
          '''
          path = default
  
          try:
              # http://stackoverflow.com/questions/6761337/inspect-getfile-vs-inspect-getsourcefile
              # first try and get the actual source file
              source_file = inspect.getsourcefile(val)
              if not source_file:
                  # get the raw file since val doesn't have a source file (could be a .pyc or .so file)
                  source_file = inspect.getfile(val)
  
              if source_file:
                  path = os.path.realpath(source_file)
  
          except TypeError as e:
              path = default
  
          return patf _get_src_file(self, val, default='Unknown'):
          '''
          return the source file path
  
          since -- 7-19-12
  
          val -- mixed -- the value whose path you want
  
          return -- string -- the path, or something like 'Unknown' if you can't find the path
          '''
          path = default
  
          try:
              # http://stackoverflow.com/questions/6761337/inspect-getfile-vs-inspect-getsourcefile
              # first try and get the actual source file
              source_file = inspect.getsourcefile(val)
              if not source_file:
                  # get the raw file since val doesn't have a source file (could be a .pyc or .so file)
                  source_file = inspect.getfile(val)
  
              if source_file:
                  path = os.path.realpath(source_file)
  
          except TypeError as e:
              path = default
  
          return path
docs: return the source file path
  
          since -- 7-19-12
  
          val -- mixed -- the value whose path you want
  
          return -- string -- the path, or something like 'Unknown' if you can't find the path