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

All Samples(10)  |  Call(4)  |  Derive(2)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/parse/greengenes.py   cogent(Download)
 
from cogent.parse.record_finder import DelimitedRecordFinder
from cogent.parse.record import DelimitedSplitter, GenericRecord
 
__author__ = "Daniel McDonald"
 
    for record in parser(lines):
        yield GenericRecord(record)
 
all_ids = lambda x,y: True

src/p/y/pycogent-HEAD/cogent/parse/greengenes.py   pycogent(Download)
 
from cogent.parse.record_finder import DelimitedRecordFinder
from cogent.parse.record import DelimitedSplitter, GenericRecord
 
__author__ = "Daniel McDonald"
 
    for record in parser(lines):
        yield GenericRecord(record)
 
all_ids = lambda x,y: True

src/c/o/cogent-1.5.3/tests/test_parse/test_record.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    class gr(GenericRecord):
        Required = {'a':'x', 'b':[], 'c':{}}
 
    def test_init(self):
        """GenericRecord init should work OK empty or with data"""
        self.assertEqual(GenericRecord(), {})
        self.assertEqual(GenericRecord({'a':1}), {'a':1})
        assert isinstance(GenericRecord(), GenericRecord)

src/p/y/pycogent-HEAD/tests/test_parse/test_record.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    class gr(GenericRecord):
        Required = {'a':'x', 'b':[], 'c':{}}
 
    def test_init(self):
        """GenericRecord init should work OK empty or with data"""
        self.assertEqual(GenericRecord(), {})
        self.assertEqual(GenericRecord({'a':1}), {'a':1})
        assert isinstance(GenericRecord(), GenericRecord)