User Profile

Collapse

Profile Sidebar

Collapse
Chris9
Chris9
Last Activity: Mar 11 '10, 10:10 PM
Joined: Mar 3 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Chris9
    replied to Remove line breaks from a BIG text file
    Thanks very much Bvdet. I had to add a line after line 7:
    f2.write(" ")
    See more | Go to post

    Leave a comment:


  • Chris9
    started a topic Remove line breaks from a BIG text file

    Remove line breaks from a BIG text file

    I need to remove line breaks from a large ASCII table, but get a MemoryError. The data is an ASCII grid: the header takes up the first 6 lines followed by 22000 rows of data. I want to remove the line breaks from the table part of the file while leaving the first 6 line breaks. The following code works for small files but runs out of memory (at the 3rd line) for large files: (thanks to Zhaphod and Bvdet from an earlier post)
    Code:
    f1 = open(fn1)
    ...
    See more | Go to post

  • Chris9
    started a topic Remove line breaks from a text file

    Remove line breaks from a text file

    I have an ASCII table where each row is a line. I'd like to replace each line break with a space so that i end up with one very long row. Any ideas? Thanks!
    See more | Go to post
No activity results to display
Show More
Working...