<div dir="ltr">thanks,  I will parse the XML report form.  </div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Vu</div></div>
<br><div class="gmail_quote">On Sat, Feb 20, 2016 at 9:23 PM, Ned Batchelder <span dir="ltr">&lt;<a href="mailto:ned@nedbatchelder.com" target="_blank">ned@nedbatchelder.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <br>
    On 2/20/16 3:10 PM, ThanhVu (Vu) Nguyen wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">Hi Ned, thanks for the quick reply.   I am using
        your tool for my research, which tries to determine how
        different program runs produce different coverage (e.g., when a
        program runs with option -a  it covers line 1,2  , and when runs
        with option -b it covers line 1,4).  Thus I want to get the
        covered lines.   
        <div><br>
        </div>
        <div>Yes I realize the xml file does include those information
          but I would have to parse it.  So I thought if python-coverage
          already has something that can output those then I don&#39;t have
          to parse the xml file.  <br>
        </div>
      </div>
    </blockquote></span>
    The XML report is the most parsable form.  It will be easier than
    parsing the annotated source files.<span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I do use the --pylib (more specifically I have cover_pylib
          = True in the .coveragerc). It does capture the coverage for
          stdlib files as expected, and python-coverage report works
          fine. However the annotate command doesn&#39;t seem to write the
          filename,cover files corresponding to the stdlib files.  <br>
        </div>
      </div>
    </blockquote></span>
    The stdlib files will be in the XML report.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    --Ned.</font></span><span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br clear="all">
          <div>
            <div>Vu</div>
          </div>
          <br>
          <div class="gmail_quote">On Sat, Feb 20, 2016 at 2:58 PM, Ned
            Batchelder <span dir="ltr">&lt;<a href="mailto:ned@nedbatchelder.com" target="_blank">ned@nedbatchelder.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> Vu,<br>
                <br>
                This is an interesting question :)  If you don&#39;t mind me
                asking, why do you want the covered lines, and why don&#39;t
                the existing reports suit your need?  The XML report is
                the most machine-readable, you might find that easier
                than dealing with the annotated files.<br>
                <br>
                The standard library isn&#39;t covered unless you ask for it
                with the --pylib switch on &quot;run&quot;.<br>
                <br>
                --Ned.
                <div>
                  <div><br>
                    <br>
                    <div>On 2/20/16 2:43 PM, ThanhVu (Vu) Nguyen wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div>
                      <div dir="ltr"><span style="font-size:12.8px">Hi,
                          I am wondering how to get the covered lines
                          using python-coverage ?   Running
                          python-coverage report -m  gives you the
                          uncovered/missed lines.  is there a similar
                          option that gives the covered lines ?   </span>
                        <div style="font-size:12.8px"><br>
                        </div>
                        <div style="font-size:12.8px">Currently to get
                          the covered lines I use python-coverage
                          annotate and go through each of the
                          filename,cover  source file and parse for
                          those with prefix &quot;&gt;&quot;  .   But this method
                          of using annotate doesn&#39;t work for standard
                          library, it generates no filename,cover files.
                            Is this a known issue ? any work around ?  </div>
                        <div style="font-size:12.8px"><br>
                        </div>
                        <div style="font-size:12.8px">Thanks,</div>
                        <div style="font-size:12.8px"><br>
                        </div>
                        <div>
                          <div>Vu</div>
                        </div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
testing-in-python mailing list
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
                </blockquote>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              testing-in-python mailing list<br>
              <a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
              <a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </span></div>

</blockquote></div><br></div>