[Biopython-dev] [Bug 2734] db.load problem with postgresql and psycopg2

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat Jan 17 10:50:19 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2734





------- Comment #4 from cymon.cox at gmail.com  2009-01-17 05:50 EST -------
> This code works form me:
> [cymon at chara ~]$ python
> Python 2.5.2 (r252:60911, Jul 24 2008, 17:11:36)
> [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from Bio import Entrez
> >>> from Bio import SeqIO
> >>> from BioSQL import BioSeqDatabase
> >>> server = BioSeqDatabase.open_database(driver="psycopg2", db = "biosql_test")
> >>> db = server.new_database("blah", description="Just for testing")
> >>> handle = Entrez.efetch(db="nuccore", id="6273291,6273290,6273289", rettype="genbank")
> >>> server.adaptor.commit()
> >>>

Sorry forgot to load it! :)

>>> db.load(SeqIO.parse(handle, "genbank"))
3
>>> server.adaptor.commit()
>>> 

C.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list