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

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/__init__.py   cogent(Download)
from cogent.core.alignment import Alignment
from cogent.parse.sequence import FromFilenameParser
from cogent.parse.structure import FromFilenameStructureParser
#note that moltype has to be imported last, because it sets the moltype in
#the objects created by the other modules.
    # currently there is no support for string-input
    assert filename is not None, 'No filename given.'
    return FromFilenameStructureParser(filename, format, **parser_kw)
 
 

src/p/y/pycogent-HEAD/cogent/__init__.py   pycogent(Download)
from cogent.core.alignment import Alignment
from cogent.parse.sequence import FromFilenameParser
from cogent.parse.structure import FromFilenameStructureParser
#note that moltype has to be imported last, because it sets the moltype in
#the objects created by the other modules.
    # currently there is no support for string-input
    assert filename is not None, 'No filename given.'
    return FromFilenameStructureParser(filename, format, **parser_kw)
 
 

src/c/o/cogent-1.5.3/tests/test_parse/test_structure.py   cogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.core.entity import Structure
from cogent.parse.structure import FromFilenameStructureParser, FromFileStructureParser
 
__author__ = "Marcin Knight"
    def test_FromFilenameStructureParser(self):
        structure = FromFilenameStructureParser('data/1LJO.pdb', 'pdb')
        self.assertRaises(TypeError, FromFilenameStructureParser, open('data/1LJO.pdb'), 'pdb')
        assert isinstance(structure, Structure)
 

src/p/y/pycogent-HEAD/tests/test_parse/test_structure.py   pycogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.core.entity import Structure
from cogent.parse.structure import FromFilenameStructureParser, FromFileStructureParser
 
__author__ = "Marcin Knight"
    def test_FromFilenameStructureParser(self):
        structure = FromFilenameStructureParser('data/1LJO.pdb', 'pdb')
        self.assertRaises(TypeError, FromFilenameStructureParser, open('data/1LJO.pdb'), 'pdb')
        assert isinstance(structure, Structure)