Re: Python does not take up available physical memory

2012-10-22 Thread Barry Scott
On 21 Oct 2012, at 15:14, Pradipto Banerjee wrote: > I tried this on a different PC with 12 GB RAM. As expected, this time, > reading the data was no issue. I noticed that for large files, Python takes > up 2.5x size in memory compared to size on disk, for the case when each line > in the fil

Re: Python does not take up available physical memory

2012-10-21 Thread Tim Delaney
On 22 October 2012 01:14, Pradipto Banerjee < pradipto.baner...@adainvestments.com> wrote: > I tried this on a different PC with 12 GB RAM. As expected, this time, > reading the data was no issue. I noticed that for large files, Python takes > up 2.5x size in memory compared to size on disk, for t

RE: Python does not take up available physical memory

2012-10-21 Thread Pradipto Banerjee
ython-list [mailto:python-list-bounces+pradipto.banerjee=adainvestments@python.org] On Behalf Of Steven D'Aprano Sent: Friday, October 19, 2012 6:12 PM To: python-list@python.org Subject: Re: Python does not take up available physical memory On Fri, 19 Oct 2012 14:03:37 -0500, Pradipto Bane

Re: Python does not take up available physical memory

2012-10-19 Thread Alain Ketterlin
Thomas Rachel writes: > Am 19.10.2012 21:03 schrieb Pradipto Banerjee: [...] >> Still got MemoryError, but at least this time python tried to use the >> physical memory. What I noticed is that before it gave me the error >> it used up to 1.5GB (of the 2.23 GB originally showed as available) - >>

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Angelico
On Sat, Oct 20, 2012 at 9:22 AM, Pradipto Banerjee wrote: > Dennis, > > 1. Yes, .readlines() work where .read() fails. Thanks for the suggestion - > this has really given a big boost to the size of the data I can read. If at all possible, consider reading the file iteratively and retaining only

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
ginal Message- From: Python-list [mailto:python-list-bounces+pradipto.banerjee=adainvestments@python.org] On Behalf Of Steven D'Aprano Sent: Friday, October 19, 2012 6:12 PM To: python-list@python.org Subject: Re: Python does not take up available physical memory On Fri, 19 Oct 2012 14:0

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
-list-bounces+pradipto.banerjee=adainvestments@python.org] On Behalf Of Dennis Lee Bieber Sent: Friday, October 19, 2012 6:01 PM To: python-list@python.org Subject: Re: Python does not take up available physical memory On Fri, 19 Oct 2012 12:08:53 -0500, Pradipto Banerjee declaimed the

Re: Python does not take up available physical memory

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 14:03:37 -0500, Pradipto Banerjee wrote: > Thanks, I tried that. Still got MemoryError, but at least this time > python tried to use the physical memory. What I noticed is that before > it gave me the error it used up to 1.5GB (of the 2.23 GB originally > showed as available) -

Re: Python does not take up available physical memory

2012-10-19 Thread Thomas Rachel
Am 19.10.2012 21:03 schrieb Pradipto Banerjee: Thanks, I tried that. What is "that"? It would be helpful to quote in a reasonable way. Look how others do it. Still got MemoryError, but at least this time python tried to use the physical memory. What I noticed is that before it gave me the e

Re: Python does not take up available physical memory

2012-10-19 Thread Steven D'Aprano
On Fri, 19 Oct 2012 14:04:21 -0500, Pradipto Banerjee wrote: > I have a 32-bit machine. Can I install a 64-bit build even if my PC is > 32-bit? No. Well, you could try, and if the installer did no error checking it might even install the 64-bit exe onto your computer, but it would crash when yo

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Pradipto Banerjee wrote: > Thanks, I tried that. Still got MemoryError, but at least this time python > tried to use the physical memory. > What I noticed is that before it gave me the error it used up to 1.5GB (of > the 2.23 GB originally showed as > available) - so in general, python takes up m

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Chris Angelico wrote: > On Sat, Oct 20, 2012 at 4:08 AM, Pradipto Banerjee > wrote: > > I am trying to read a file into memory. The size of the file is around 1 GB. > > I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available > > physical memory when I was trying to read the fil

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Angelico
On Sat, Oct 20, 2012 at 4:08 AM, Pradipto Banerjee wrote: > I am trying to read a file into memory. The size of the file is around 1 GB. > I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available > physical memory when I was trying to read the file. I tried to read the file > as

Re: Python does not take up available physical memory

2012-10-19 Thread Chris Kaynor
On Fri, Oct 19, 2012 at 12:03 PM, Pradipto Banerjee wrote: > > Thanks, I tried that. Still got MemoryError, but at least this time python > tried to use the physical memory. What I noticed is that before it gave me > the error it used up to 1.5GB (of the 2.23 GB originally showed as available)

RE: Python does not take up available physical memory

2012-10-19 Thread Prasad, Ramit
Emile van Sebille wrote: > On 10/19/2012 10:08 AM, Pradipto Banerjee wrote: > > Hi, > > > > I am trying to read a file into memory. The size of the file is around 1 > > GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB > > available physical memory when I was trying to read the

RE: Python does not take up available physical memory

2012-10-19 Thread Ian Kelly
On Oct 19, 2012 1:05 PM, "Pradipto Banerjee" < pradipto.baner...@adainvestments.com> wrote: > > I have a 32-bit machine. Can I install a 64-bit build even if my PC is 32-bit? No. Try following up on Emile's suggestion instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python does not take up available physical memory

2012-10-19 Thread MRAB
On 2012-10-19 20:04, Pradipto Banerjee wrote: I have a 32-bit machine. Can I install a 64-bit build even if my PC is 32-bit? No. A 64-bit build is for a 64-bit PC. -- http://mail.python.org/mailman/listinfo/python-list

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
file itself. -Original Message- From: Python-list [mailto:python-list-bounces+pradipto.banerjee=adainvestments@python.org] On Behalf Of Emile van Sebille Sent: Saturday, October 20, 2012 2:46 AM To: python-list@python.org Subject: Re: Python does not take up available physical memory

RE: Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
does not take up available physical memory On Fri, Oct 19, 2012 at 11:08 AM, Pradipto Banerjee wrote: > Is there any reason why python can't read a 1GB file in memory even when a > 2.3 GB physical memory is available? Do I need to make a change in some > setting or preferences? >

Re: Python does not take up available physical memory

2012-10-19 Thread Ian Kelly
On Fri, Oct 19, 2012 at 11:08 AM, Pradipto Banerjee wrote: > Is there any reason why python can’t read a 1GB file in memory even when a > 2.3 GB physical memory is available? Do I need to make a change in some > setting or preferences? > > > > I am using python(x,y) distribution (python 2.7) and u

Re: Python does not take up available physical memory

2012-10-19 Thread Emile van Sebille
On 10/19/2012 10:08 AM, Pradipto Banerjee wrote: Hi, I am trying to read a file into memory. The size of the file is around 1 GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available physical memory when I was trying to read the file. I tried to read the file as follows:

Python does not take up available physical memory

2012-10-19 Thread Pradipto Banerjee
Hi, I am trying to read a file into memory. The size of the file is around 1 GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB available physical memory when I was trying to read the file. I tried to read the file as follows: >>> fdata = open(filename, 'r').read() I got a