Hello there, >> I'll add one option to the mix, and summarize the other options I saw listed >> earlier. >> >> Option A (tempfile): >> >> Create a directory and copy your pristine tree into the directory >> and make the base directory for the important data files configurable. >> Also known as parameterization. >> >> Option B (starting with Danny's sample code) >> >> Create the objects to emulate whatever filesystem behaviour you need. >> >> Option C (use pyfakefs): >> >> Use pyfakefs, which acts like a filesystem for testing purposes. >> https://pypi.python.org/pypi/pyfakefs >> https://github.com/jmcgeheeiv/pyfakefs >> >> Option D (use StringIO): >> >> If you are less concerned about filesystem interactions and really >> just want an individual thingy that that behaves like a file, but >> can be constructed in memory, use StringIO (or cStringIO). > >Isn't option D what Danny was using to make option B? Or are you >saying keep things even simpler?
Oh dear--yes. Apologies, Danny and boB. To the doghouse with me. -Martin -- Martin A. Brown http://linux-ip.net/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor