openmicroscopy/openmicroscopy — pull request #2614 by chris-allan (2014-06-12 08:25:12+00:00)
Title: Add capability to work with file handle (develop)

`develop` version of #2491

This PR add capability to pass file handle to ParsingContext Class to attach bulk annotation to Plate.
Changes:
* populate_metadata.py: Added extra method in ParsingContext Class to be able to pass the file handle rather then file path.
* populate_roi.py: changed tempfile mode to universal new line mode to handle files from various file systems.

To test:
* check that popultate_metadata script still works as originally intended from command line by passing file path: "python poulate_metadata.py *connection_details* Plate:Plate_ID bulk_annotation.csv"
* check that behaviour is the same when using new feature. Use ParsingContext Class in new python script, open bulk_annotation.csv (file = open("bulk_annotation.csv", 'U')) and use parse_from_handle method to populate metadata.