Did I find the right examples for you? yes no

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
In a line of the format "<line_num>:    <text>"or "<line_num>    <text>"
this grabs line_num.

>>> parse_line_number('5: def parse_line_number(line_str):')
'5'
>>> parse_line_number('43              line = view.line(s)')
'43'
>>> parse_line_number('136:             line_num = parse_line_number(line_str)')
'136'

        def parse_line_number(line_str):
    """
    In a line of the format ":    "or "    "
    this grabs line_num.

    >>> parse_line_number('5: def parse_line_number(line_str):')
    '5'
    >>> parse_line_number('43              line = view.line(s)')
    '43'
    >>> parse_line_number('136:             line_num = parse_line_number(line_str)')
    '136'
    """
    parts = line_str.split()
    line_num = parts[0].strip().replace(':', '')
    return line_num
        


src/c/h/ChocolateyPackages-HEAD/EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/OpenSearchResult/open_search_result.py   ChocolateyPackages(Download)
import os
import sublime, sublime_plugin
# Load with Python3, fallback to load with Python2
try:
    from .util import parse_line_number, is_file_path
except ValueError:
    from util import parse_line_number, is_file_path
            line = view.line(s)
            line_str = view.substr(view.line(s))
            line_num = parse_line_number(line_str)
 
            if is_file_path(line_str) or line_num:
            cur_line = self.view.line(cursor)
            line_str = self.view.substr(cur_line).strip()
            line_num = parse_line_number(line_str)
 
            if open_everywhere == False and self.view.name() != 'Find Results':

src/o/p/OpenSearchResult-HEAD/open_search_result.py   OpenSearchResult(Download)
import os
import sublime, sublime_plugin
# Load with Python3, fallback to load with Python2
try:
    from .util import parse_line_number, is_file_path
except ValueError:
    from util import parse_line_number, is_file_path
            line = view.line(s)
            line_str = view.substr(view.line(s))
            line_num = parse_line_number(line_str)
 
            if is_file_path(line_str) or line_num:
            cur_line = self.view.line(cursor)
            line_str = self.view.substr(cur_line).strip()
            line_num = parse_line_number(line_str)
 
            if open_everywhere == False and self.view.name() != 'Find Results':