Code review comment for lp:~mbp/python-oops-datedir-repo/bsondump

Revision history for this message
Gavin Panella (allenap) wrote :

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.

review: Needs Fixing

« Back to merge proposal