Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31981 > unrolled thread

Re: Fast forward-backward (write-read)

Started byTim Chase <python.list@tim.thechases.com>
First post2012-10-23 19:30 -0500
Last post2012-10-23 19:30 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Fast forward-backward (write-read) Tim Chase <python.list@tim.thechases.com> - 2012-10-23 19:30 -0500

#31981 — Re: Fast forward-backward (write-read)

FromTim Chase <python.list@tim.thechases.com>
Date2012-10-23 19:30 -0500
SubjectRe: Fast forward-backward (write-read)
Message-ID<mailman.2707.1351038598.27098.python-list@python.org>
On 10/23/12 13:37, Virgil Stokes wrote:
> Yes, I do wish to inverse the order,  but the "forward in time"
> file will be in binary.

Your original post said:

> The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII format

making it hard to know what sort of data is in this file.

So I guess it would help to have some sample data to work with, even
if it's just some dummy data and a raw processing loop without doing
anything inside it.  Something like the output of either of these

  $ xxd forward_data.txt | head -50 > forward_head.txt
  $ od forward_data.txt | head -50 > forward_head.txt

plus a basic loop to show how you're extracting the values:

  for line in file("forward_head.txt"):
    data1, data2, data3 = process(line)

and how you want to reverse over them:

  for line in file("reversed.txt"):
    if same_processing_as_forward_source:
      data1, data2, data3 = process(line)
    else:
      data1, data2, data3 = other_process(line)

or do you want something more like

  for line in super_reverse_magic(file("forward_head.txt")):
    data1, data2, data3 = process(line)

?

-tkc


[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web