On Tue, Aug 13, 2013 at 6:01 AM, Daπid wrote:
> Alternatively, you could also use seek to put the pointer a certain
> distance from the end of the file and start from there,
That's what I'd do if the file(s) may be too large to simply dump into memory.
> but this could cause problems in Windows
On 13 August 2013 14:20, Resmi wrote:
> As a workaround, I've tried using os.system along with grep. And I get the
> following output :
>
os.system("grep -e 'tx' 'data.dat' ")
> ## tx =2023.06
> 0
>
> Why is there a 0 in the output? The file has no blank lines.
That 0 corresponds to the
Hi Resmi
On Tue, Aug 13, 2013 at 2:20 PM, Resmi wrote:
> I've a list of long files of numerical data ending with footer lines
> (beginning with #). I am using numpy.loadtxt to read the numbers, and
> loadtxt ignores these footer lines. I want the numpy code to read one of the
> footer lines and e
On Tue, Aug 13, 2013 at 1:20 PM, Resmi wrote:
> Hi,
>
> I've a list of long files of numerical data ending with footer lines
> (beginning with #). I am using numpy.loadtxt to read the numbers, and
> loadtxt ignores these footer lines. I want the numpy code to read one of the
> footer lines and ext
Hi,
I've a list of long files of numerical data ending with footer lines
(beginning with #). I am using numpy.loadtxt to read the numbers, and
loadtxt ignores these footer lines. I want the numpy code to read one of
the footer lines and extract words from it. Is there a way to use loadtxt
for this