Merge lp:~mbp/python-oops-datedir-repo/bsondump into lp:python-oops-datedir-repo
Proposed by
Martin Pool
Status: | Merged |
---|---|
Merged at revision: | 32 |
Proposed branch: | lp:~mbp/python-oops-datedir-repo/bsondump |
Merge into: | lp:python-oops-datedir-repo |
Diff against target: |
58 lines (+34/-0) 3 files modified
.bzrignore (+1/-0) scripts/bsondump (+30/-0) setup.py (+3/-0) |
To merge this branch: | bzr merge lp:~mbp/python-oops-datedir-repo/bsondump |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Gavin Panella (community) | Needs Fixing | ||
Review via email: mp+86338@code.launchpad.net |
Description of the change
This copies in the little bsondump script to make oops files readable.
It's a bit unclear which of the many oops components this really belongs in - it's not specific to storing it in per-date directories - but wgrant wanted it here, so here it is.
To post a comment you must log in.
Typically a script like this would go in utilities/ and the first thing it would do is import _pythonpath. Alternatively you could put it in and use buildout's templating to get the path setup. In either case you could then rely on having access to the same bson library that Launchpad depends on (bson 0.3.2 right now), and the code could cry a little less :)
You could consider using fileinput to deal with stdin and/or named files, though I'm not sure how well bson would cope with a stream containing multiple documents (for want of a better term).
Something like this might be a worthy addition to https:/ /github. com/mongodb/ mongo-python- driver (upstream for the python-bson package), so that we could use, say, `python -m bson/dump` anywhere python-bson is installed.