[Bioperl-l] flushing i/o with TreeIO

Aaron J Mackey Aaron J. Mackey" <amackey@virginia.edu
Thu, 11 Jul 2002 18:26:17 -0400 (EDT)


Shouldn't we be flushing our filehandles after we finish with a
write_seq??  Is there some reason not to?  It seems like not doing so just
leads to this kind of odd, "behind the scenes" behavior ...

-Aaron

On Thu, 11 Jul 2002, Jason Stajich wrote:

> You can do this by destructing the object -
> $treeout = undef;
> Since Bio::TreeIO objects are Bio::Root::IO objects you should be able to
> close the filehandle by saying
> $treeout->close();
>
> There is a way to turn autoflushing on by saying
> $treeout->fh->autoflush(1) ;
> but I think the above will work for you.
>
> HTH.
>
> >
> > The only solution I have found is to return from the subroutine where the
> > tree manipulation is happening.
> >
> > How do I flush output to file, or close the output file, to make it
> > available for future reads, without having to exit the subroutine?
> >
> > Thanks,
> > Howard
> >
>
>

-- 
 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 amackey@virginia.edu