def get_src_path(self, obj, append_base=True):
path = getsourcefile(obj)<EOL>if self.src_root not in path:<EOL><INDENT>if hasattr(obj, "<STR_LIT>"):<EOL><INDENT>path = "<STR_LIT>" % (obj.__module__, obj.__name__)<EOL><DEDENT>else:<EOL><INDENT>path = obj.__name__<EOL><DEDENT>path = path.replace("<STR_LIT:.>", "<STR_LIT:/>")<EOL><DEDENT>pre, post = path.rsplit(self.src_root + "<STR_LIT:/>", <NUM_LIT:1>)<EOL>lineno = self.get_line_no(obj)<EOL>lineno = "<STR_LIT>" if lineno is None else "<STR_LIT>".format(lineno)<EOL>path = self.src_root + "<STR_LIT:/>" + post + lineno<EOL>if append_base:<EOL><INDENT>path = os.path.join(self.github_link, path)<EOL><DEDENT>return path<EOL>
Creates a src path string with line info for use as markdown link.