Hi Titus,
another little correction: your usage of
worldbase.here.annotationTutorial... may not behave the way you were
expecting it to, because 0.8 got rid of pygr.Data's confusing "zones"
notation ("here" meaning current directory, "my" meaning your home
directory etc.). Users consistently found that old notation
confusing, so I got rid of it. So in 0.8 "here" is not being
interpreted specially, it is just being treated as the first word of
your resourceID.
The new metabase interface in 0.8 allows you to work directly with
individual metabases, which seemed like an improvement over the
confusing "zones" notation. After all, good programming constructs
try to make it very explicit what destination you are writing to. The
new interface makes that clearer, I think. You just get the specific
metabase you want, and then use its namespace directly:
# get namespace root of desired metabase
mdbRoot = worldbase.zones['here'].Data
# save a resource to this metabase
mdbRoot.annotationTutorial.dna_db = dna_db
# save more data...
# commit our changes to this metabase
mdbRoot.commit()
Of course, you don't need to get into any of this in your tutorial if
you don't want to. If you just write to worldbase directly, it will
simply write to the first writable metabase in your WORLDBASEPATH.
-- Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---