code: def getsourcefile(object):
      
      filename = getfile(object)
      if string.lower(filename[-4:]) in ['.pyc', '.pyo']:
          filename = filename[:-4] + '.py'
      for suffix, mode, kind in imp.get_suffixes():
          if 'b' in mode and string.lower(filename[-len(suffix):]) == suffix:
              # Looks like a binary file.  We want to only return a text file.
              return None
      if os.path.exists(filename):
          return filename
docs: Return the Python source file an object was defined in, if it exists.