Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Memory Error while reading large file

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


sumant.gupta at aricent

Jul 30, 2008, 10:01 PM

Post #1 of 6 (695 views)
Permalink
Memory Error while reading large file

Hi

I have a problem reading very large text file.
When I call the len function to get the total lines in python file.i get memory error .
I am reading the list of files in a loop ,2 files are read properly but when the third file is read ,
It gives an memory error .

Sumant Gupta
Software Engineer
Ext:5105


________________________________
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error,please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility forloss or damage arising from the use of the information transmitted by this email including damage from virus."


steve at pearwood

Jul 31, 2008, 12:02 AM

Post #2 of 6 (663 views)
Permalink
Re: Memory Error while reading large file [In reply to]

On Thu, 31 Jul 2008 03:01:42 pm Sumant Gupta wrote:
> Hi
>
> I have a problem reading very large text file.
> When I call the len function to get the total lines in python file.i
> get memory error . I am reading the list of files in a loop ,2 files
> are read properly but when the third file is read , It gives an
> memory error .

I'm not completely sure, but I think that means you're out of memory.

If you have an actual question, I think you would be better off posting
to the comp.lang.python newsgroup. This mailing list is for development
of the Python compiler, not for writing Python programs.

I'll save you some time: when you post to comp.lang.python, you should
post the actual error message you get, and the code that fails.


--
Steven
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Jul 31, 2008, 1:40 PM

Post #3 of 6 (645 views)
Permalink
Re: Memory Error while reading large file [In reply to]

> If you have an actual question

I'd like to stress this point as well. Any good posting one
wants an answer to must include a question, and that question
must be explicitly phrased, and terminated with a question
mark.

(maybe the use of the question mark is more typical in German
than in English; my stomach turns around when I read a question
that ends with a full stop)

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


scott+python-dev at scottdial

Jul 31, 2008, 2:38 PM

Post #4 of 6 (649 views)
Permalink
Re: Memory Error while reading large file [In reply to]

Martin v. Löwis wrote:
> (maybe the use of the question mark is more typical in German
> than in English; my stomach turns around when I read a question
> that ends with a full stop)

There is no loss in translation here. Proper English requires the use of
a question mark just the same as German, but you can't assume proper
English will be used on a forum of communication like this one. The OP
stated his problem, and maybe he doesn't know enough English to actually
ask his question (I'm guessing by the name "Sumant Gupta"). I don't
believe you are native speaker yourself, and I would've expected more
sympathy from you. Lord knows I hope the recipients of any German I
write will have some.

-Scott

--
Scott Dial
scott [at] scottdial
scodial [at] cs
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


guido at python

Jul 31, 2008, 2:43 PM

Post #5 of 6 (638 views)
Permalink
Re: Memory Error while reading large file [In reply to]

On Thu, Jul 31, 2008 at 2:38 PM, Scott Dial
<scott+python-dev [at] scottdial> wrote:
> Martin v. Löwis wrote:
>>
>> (maybe the use of the question mark is more typical in German
>> than in English; my stomach turns around when I read a question
>> that ends with a full stop)
>
> There is no loss in translation here. Proper English requires the use of a
> question mark just the same as German, but you can't assume proper English
> will be used on a forum of communication like this one. The OP stated his
> problem, and maybe he doesn't know enough English to actually ask his
> question (I'm guessing by the name "Sumant Gupta"). I don't believe you are
> native speaker yourself, and I would've expected more sympathy from you.
> Lord knows I hope the recipients of any German I write will have some.

On the level of mercy: (a) this is python-dev, which is explicitly
*not* for user questions; (b) the OP didn't show any actual code nor
error messages, which makes it impossible to help him unless you're
clairvoyant. Unfortunately we get quite a few of such ill-defined
problems in this list, despite it not being the wrong list, and my own
patience wears thin at times too. (I also get quite a bit of personal
mail of the same nature.)

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


greg.ewing at canterbury

Jul 31, 2008, 6:49 PM

Post #6 of 6 (633 views)
Permalink
Re: Memory Error while reading large file [In reply to]

Martin v. Löwis wrote:

> (maybe the use of the question mark is more typical in German
> than in English; my stomach turns around when I read a question
> that ends with a full stop)

No, it's required in English, too.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.