a faster and simpler solution, assuming you are on unix, is to just use
the sort command:
spl6 tmp: cat 1-
1740060
1780040
1890002
spl6 tmp: cat 1+
17301
thomasvang...@gmail.com wrote:
Dear Fellow programmers,
I'm using Python scripts too organize some rather large datasets
describing DNA variation. Information is read, processed and written
too a file in a sequential order, like this
1+
1-
2+
2-
etc.. The files that i created contain positional i
On Mar 20, 11:59 am, Daniel Fetchinson
wrote:
> Have you considered using a lightweight database solution? Sqlite is a
> really simple, zero configuration, server-less db and a python binding
> for it comes with python itself. I'd give it a try, it will simplify
> tasks like these a great deal.
>
> I'm using Python scripts too organize some rather large datasets
> describing DNA variation. Information is read, processed and written
> too a file in a sequential order, like this
> 1+
> 1-
> 2+
> 2-
>
> etc.. The files that i created contain positional information
> (nucleotide position) and s
thomasvang...@gmail.com wrote:
Thanks,
This works great!
I did not know that it is possible to iterate through the file lines
with a while function that's conditional on additional lines being
present or not.
It relies on file.readline() returning an empty string when it's at the
end of the fil
Thanks,
This works great!
I did not know that it is possible to iterate through the file lines
with a while function that's conditional on additional lines being
present or not.
--
http://mail.python.org/mailman/listinfo/python-list
thomasvang...@gmail.com wrote:
Dear Fellow programmers,
I'm using Python scripts too organize some rather large datasets
describing DNA variation. Information is read, processed and written
too a file in a sequential order, like this
1+
1-
2+
2-
etc.. The files that i created contain positional