Modified the extract_data() function to allow file objects to be passed into it.
Authored by: bugman 2008-06-24
Parent: [r6488]
Child: [r6490]