/// <summary> /// Returns the comment corresponding to the given line or an empty string if there is no comment /// </summary> /// <param name="lineNum">The line number</param> internal static string GetComment(this IPythonModule module, int lineNum) { string line = module.GetLine(lineNum); int commentPos = line.IndexOf('#'); if (commentPos < 0) { return(string.Empty); } return(line.Substring(commentPos + 1).Trim('\t', ' ')); }