rsennrich/Bleualign — pull request #8 by sih4sing5hong5 (2014-07-02 06:04:49+00:00)
Title: aligner's arugments passing by string, StringIO, and file object

I modify Aligner.__init__ like:

if options['srcfile']:
try:
self.src = open(options['srcfile'], 'rU')
except:
if isinstance(options['srcfile'], io.TextIOBase):
self.src = options['srcfile']
else:
self.src = io.StringIO('\n'.join(options['srcfile']))

I also make tests with texts generated by python 3.