Return an Array of breakpoints in filename.
    The list will contain an entry for each distinct line event call
    so it is possible (and possibly useful) for a line number appear more
    than once.
765549
def trace_line_numbers(filename, reload_on_change=False):
    """"""
    fullname = cache_file(filename, reload_on_change)
    if not fullname: return None
    e = file_cache[filename]
    if not e.line_numbers:
        if hasattr(coverage.coverage, 'analyze_morf'):
            e.line_numbers = coverage.the_coverage.analyze_morf(fullname)[1]
        else:
            cov = coverage.coverage()
            cov._warn_no_data = False
            e.line_numbers = cov.analysis(fullname)[1]
            pass
        pass
    return e.line_numbers
355674
def _insert_breaklines(self):
    
    target_chunks = ChunkList()
    for chunk in self:
      if chunk.word[-1] == ' ' and chunk.has_cjk():
        chunk.word = chunk.word[:-1]
        target_chunks.append(chunk)
        target_chunks.append(chunk.breakline())
      else:
        target_chunks.append(chunk)
    self.list = target_chunks
962471
def get_frames(tback, is_breakpoint):
    """"""

    frames = []

    while tback is not None:
        if tback.tb_next is None and is_breakpoint:
            break

        filename = tback.tb_frame.f_code.co_filename
        function = tback.tb_frame.f_code.co_name
        context = tback.tb_frame.f_locals
        lineno = tback.tb_lineno - 1
        tback_id = id(tback)
        pre_context_lineno, pre_context, context_line, post_context = get_lines_from_file(filename, lineno + 1, 7)
        frames.append(ErrorFrame(tback, filename, function, lineno, context, tback_id, pre_context, context_line, post_context, pre_context_lineno))
        tback = tback.tb_next

    return frames
1042179
def check_for_indent_warnings!(line, filename)
      return [] if line == ""
      indent_size = get_indent_size line
      if indent_size > current_indent
        self.indent_stack.push indent_size
      elsif indent_size < current_indent
        previous = self.indent_stack.pop
        if indent_size != current_indent &&
           using.include?(MisalignedUnindentationWarning)
          warnings_to_check = [MisalignedUnindentationWarning.new(filename, line, current_indent)]
          return filtered_warnings_from_line(line, warnings_to_check)
        end
      end
      []
    end
69358
def list_fence(self, filename):
        ''''''
        self.fenceloader.clear()
        count = self.get_mav_param('FENCE_TOTAL', 0)
        if count == 0:
            print("No geo-fence points")
            return
        for i in range(int(count)):
            p = self.fetch_fence_point(i)
            if p is None:
                return
            self.fenceloader.add(p)

        if filename is not None:
            try:
                self.fenceloader.save(filename.strip('"'))
            except Exception as msg:
                print("Unable to save %s - %s" % (filename, msg))
                return
            print("Saved %u geo-fence points to %s" % (self.fenceloader.count(), filename))
        else:
            for i in range(self.fenceloader.count()):
                p = self.fenceloader.point(i)
                self.console.writeln("lat=%f lng=%f" % (p.lat, p.lng))
        if self.status.logdir is not None:
            fname = 'fence.txt'
            if self.target_system > 1:
                fname = 'fence_%u.txt' % self.target_system
            fencetxt = os.path.join(self.status.logdir, fname)
            self.fenceloader.save(fencetxt.strip('"'))
            print("Saved fence to %s" % fencetxt)
        self.have_list = True
745100
def read_file(filename):
        
        lines = []
        with open(filename) as f:
            for line in f:
                if len(line.strip()) != 0:
                    lines.append(line.strip())
        return lines
796960
def _checkpoint_out_filenames(self):
        
        out_filenames = []
        if self.Parameters['-n'].isOn():
            out_name = str(self.Parameters['-n'].Value)
            walk_root = self.WorkingDir
            if self.Parameters['-w'].isOn():
                walk_root = str(self.Parameters['-w'].Value)
            for tup in walk(walk_root):
                dpath, dnames, dfiles = tup
                if dpath == walk_root:
                    for gen_file in dfiles:
                        if out_name in gen_file and "checkpoint" in gen_file:
                            out_filenames.append(walk_root + gen_file)
                    break

        else:
            raise ValueError, "No output file specified."
        return out_filenames
1249629
def build_lines_data(self, code_obj):
        

        # Offset: lineno pairs, only for offsets which start line.
        # Locally we use list for more convenient iteration using indices
        if self.version > 1.4:
            linestarts = list(self.opc.findlinestarts(code_obj))
        else:
            linestarts = [[0, 1]]
        self.linestarts = dict(linestarts)

        # 'List-map' which shows line number of current op and offset of
        # first op on following line, given offset of op as index
        lines = []
        LineTuple = namedtuple('LineTuple', ['l_no', 'next'])

        # Iterate through available linestarts, and fill
        # the data for all code offsets encountered until
        # last linestart offset
        _, prev_line_no = linestarts[0]
        offset = 0
        for start_offset, line_no in linestarts[1:]:
            while offset < start_offset:
                lines.append(LineTuple(prev_line_no, start_offset))
                offset += 1
            prev_line_no = line_no

        # Fill remaining offsets with reference to last line number
        # and code length as start offset of following non-existing line
        codelen = len(self.code)
        while offset < codelen:
            lines.append(LineTuple(prev_line_no, codelen))
            offset += 1
        return lines
896404
function breakpointToString(options) {
  var mq;

  if ('undefined' !== typeof options.mq) {
    mq = options.mq;
  } else {
    var max = Util.getOption(options.max, Infinity);
    var min = Util.getOption(options.min, 0);

    mq = 'only screen';
    if (max < Infinity) {
      mq += ' and (max-width: ' + max + 'px)';
    }
    if (min > 0) {
      mq += ' and (min-width: ' + min + 'px)';
    }
  }

  return mq;
}
1166787
def get_process_code_breakpoints(self, dwProcessId):
        
        return [ bp for ((pid, address), bp) in compat.iteritems(self.__codeBP) \
                if pid == dwProcessId ]
326613
function () {

        var st     = stack()[2],
            result = {};

        result.filename = path.basename(st.getFileName());
        result.line = st.getLineNumber();

        return result;
    }
1314502
def breakpoint(args):
    
    from jcvi.utils.iter import pairwise

    p = OptionParser(breakpoint.__doc__)
    p.add_option("--diff", default=.1, type="float",
                 help="Maximum ratio of differences allowed [default: %default]")
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    mstmap, = args
    diff = opts.diff
    data = MSTMap(mstmap)

    # Remove singleton markers (avoid double cross-over)
    good = []
    nsingletons = 0
    for i in xrange(1, len(data) - 1):
        a = data[i]
        left_label, left_rr = check_markers(data[i - 1], a, diff)
        right_label, right_rr = check_markers(a, data[i + 1], diff)

        if left_label == BREAK and right_label == BREAK:
            nsingletons += 1
            continue

        good.append(a)

    logging.debug("A total of {0} singleton markers removed.".format(nsingletons))

    for a, b in pairwise(good):
        label, rr = check_markers(a, b, diff)
        if label == BREAK:
            print("\t".join(str(x) for x in rr))
788825
def get_file_lines(self, subsystem, option):
        
        assert subsystem in self
        with open(os.path.join(self.per_subsystem[subsystem], subsystem + '.' + option)) as f:
            for line in f:
                yield line
983443
def unique_files(event_list):
    

    if isinstance(event_list, dcase_util.containers.MetaDataContainer):
        return event_list.unique_files

    else:
        files = {}
        for event in event_list:
            if 'file' in event:
                files[event['file']] = event['file']

            elif 'filename' in event:
                files[event['filename']] = event['filename']

        files = list(files.keys())
        files.sort()
        return files
304498
def get_lines(self):
        
        code = []

        for counter, item in enumerate(self.model._default_manager.all()):
            instance = InstanceCode(instance=item, id=counter + 1, context=self.context, stdout=self.stdout, stderr=self.stderr, options=self.options)
            self.instances.append(instance)
            if instance.waiting_list:
                code += instance.lines

        # After each instance has been processed, try again.
        # This allows self referencing fields to work.
        for instance in self.instances:
            if instance.waiting_list:
                code += instance.lines

        return code
335771
def file_source(self, filename):
        
        lines = []
        try:
            with self.filesystem.open(filename) as f:
                line_statuses = dict(self.line_statuses(filename))
                for lineno, source in enumerate(f, start=1):
                    line_status = line_statuses.get(lineno)
                    line = Line(lineno, source, line_status, None)
                    lines.append(line)

        except self.filesystem.FileNotFound as file_not_found:
            lines.append(
                Line(0, '%s not found' % file_not_found.path, None, None)
            )

        return lines
490241
def remove_all_breakpoints(self, py_db, filename):
        '''
        
        '''
        changed = False
        lst = [
            py_db.file_to_id_to_line_breakpoint,
            py_db.file_to_id_to_plugin_breakpoint,
            py_db.breakpoints
        ]
        if hasattr(py_db, 'django_breakpoints'):
            lst.append(py_db.django_breakpoints)

        if hasattr(py_db, 'jinja2_breakpoints'):
            lst.append(py_db.jinja2_breakpoints)

        for file_to_id_to_breakpoint in lst:
            if filename == '*':
                if file_to_id_to_breakpoint:
                    file_to_id_to_breakpoint.clear()
                    changed = True
            else:
                if filename in file_to_id_to_breakpoint:
                    del file_to_id_to_breakpoint[filename]
                    changed = True

        if changed:
            py_db.on_breakpoints_changed(removed=True)