Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Read a single Medline record from the handle.

The handle is either is a Medline file, a file-like object, or a list
of lines describing a Medline record.

Typical usage:

    from Bio import Medline
    with open("mymedlinefile") as handle:
        record = Medline.read(handle)(more...)

        def read(handle):
    """Read a single Medline record from the handle.

    The handle is either is a Medline file, a file-like object, or a list
    of lines describing a Medline record.

    Typical usage:

        from Bio import Medline
        with open("mymedlinefile") as handle:
            record = Medline.read(handle)
            print(record['TI'])

    """
    #TODO - Turn that into a working doctest
    records = parse(handle)
    return next(records)
        


src/b/i/Bio_Eutils-1.63/Tests/test_Medline.py   Bio_Eutils(Download)
    def test_read(self):
        handle = open("Medline/pubmed_result1.txt")
        record = Medline.read(handle)
        handle.close()
        self.assertEqual(record["PMID"], "12230038")