Jump to content

Can someone write me a Python script?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
ki4jgt

ki4jgt

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
Hi, I'm trying to write a bible program. I'm having no luck. My programming language of choice is BASIC. (Not VB either - have Linux) My problem is. I have the bible in this format.

Quote

Genesis



1:1 In the beginning God created the heaven and the earth.



1:2 And the earth was without form, and void; and darkness was upon

the face of the deep. And the Spirit of God moved upon the face of the

waters.



1:3 And God said, Let there be light: and there was light.



1:4 And God saw the light, that it was good: and God divided the light

from the darkness.



1:5 And God called the light Day, and the darkness he called Night.

And the evening and the morning were the first day.



1:6 And God said, Let there be a firmament in the midst of the waters,

and let it divide the waters from the waters.



1:7 And God made the firmament, and divided the waters which were

under the firmament from the waters which were above the firmament:

and it was so.

I need each individual verse on one line, and no spaces. The only problem is. . . BASIC takes up too much RAM and quickly ties the machine up. I've tried reading the entire file into memory and letting the program modify it as it goes along, reading the file into memory 1000 lines at a time and printing them to another file. Some how it keeps getting stuck. I've tried printing out each line into the basic terminal and then saving the outputed text. Halfway through, I have to reboot my PC.
It's driving me nuts.

#2
ki4jgt

ki4jgt

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
i DID IT!! :-) i REDID THE 1000 LINES THING. IT WORKED!

#3
so1i

so1i

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 312 posts
Nice one :)
My Company - My Homepage - My Twitter - My Google+ - My LinkedIn

"Things don’t have to change the world to be important.” - Steve Jobs

#4
ki4jgt

ki4jgt

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
Gracias!