Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-11 Thread Grant Edwards
On 2013-03-09, Roy Smith wrote: > In article , > Grant Edwards wrote: > >> What I should have said was that there's no way to return to the OS >> memory obtained via calls to malloc() et al. > > That's true (for certain values of "et al"). > >> and those are the calls that "good" C programmers (

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Roy Smith
In article , Grant Edwards wrote: > What I should have said was that there's no way to return to the OS > memory obtained via calls to malloc() et al. That's true (for certain values of "et al"). > and those are the calls that "good" C programmers (like the > maintainers of CPython) use. Well

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Grant Edwards
On 2013-03-09, Roy Smith wrote: > In article , > Grant Edwards wrote: > >> In Unix there is no way to release heap memory (which is what you're >> talking about) back to the OS except for terminating the process. > > That's not quite true. The man page for BRK(2) (at least on the Linux > box I

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Roy Smith
In article , Grant Edwards wrote: > In Unix there is no way to release heap memory (which is what you're > talking about) back to the OS except for terminating the process. That's not quite true. The man page for BRK(2) (at least on the Linux box I happen to have handy) says: "brk() and sbrk

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Grant Edwards
On 2013-03-09, Wong Wah Meng-R32813 wrote: Your entire post is in your signature block. Don't do that. Many people have newsreaders or e-mail clinets configured to hide or ignore signature blocks. >Yes I have verified my python application is reusing the memory (just >that it doesn't reduce once

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Isaac To
In general, it is hard for any process to return the memory the OS allocate to it back to the OS, short of exiting the whole process. The only case that this works reliably is when the process allocates a chunk of memory by mmap (which is chosen by libc if it malloc or calloc a large chunk of memo

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Dave Angel
On 03/09/2013 03:07 AM, Wong Wah Meng-R32813 wrote: Yes I have verified my python application is reusing the memory (just that it doesn't reduce once it has grown) and my python process doesn't have any issue to run even though it is seen taking up more than 2G in footprint. My problem is c

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Wong Wah Meng-R32813
If the memory usage is continually growing, you have something else that is a problem -- something is holding onto objects. Even if Python is not returning memory to the OS, it should be reusing the memory it has if objects are being freed. -- [] Yes I have verified my python applicat

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-08 Thread Wong Wah Meng-R32813
The problem is my server hits memory usage threshold, and starts giving me errors like Oracle unable to spawn off new session stating Out of Memory error and what not. I won't be bothered much if I have the luxury of available memory for other processes to use. If only if the UNIX understand my

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Chris Angelico
On Thu, Mar 7, 2013 at 5:33 PM, Wong Wah Meng-R32813 wrote: > [] The example is written for illustration purpose. Thanks for pointing out a > better way of achieving the same result. Yes it seems so that the OS thinks > the piece allocated to Python should not be taken back unless the process >

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Wong Wah Meng-R32813
Python does not guarantee to return memory to the operating system. Whether it does or not depends on the OS, but as a general rule, you should expect that it will not. for i in range(10L): > ... str=str+"%s"%(i,) You should never build large strings in that way. It risks being

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Steven D'Aprano
On Wed, 06 Mar 2013 10:11:12 +, Wong Wah Meng-R32813 wrote: > Hello there, > > I am using python 2.7.1 built on HP-11.23 a Itanium 64 bit box. > > I discovered following behavior whereby the python process doesn't seem > to release memory utilized even after a varia

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Dave Angel
On 03/06/2013 07:31 AM, Wong Wah Meng-R32813 wrote: Apologies as after I have left the group for a while I have forgotten how not to post a question on top of another question. Very sorry and appreciate your replies. I tried explicitly calling gc.collect() and didn't manage to see the memory

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Dave Angel
On 03/06/2013 05:25 AM, Bryan Devaney wrote: On Wednesday, March 6, 2013 10:11:12 AM UTC, Wong Wah Meng-R32813 wrote: Hello there, I am using python 2.7.1 built on HP-11.23 a Itanium 64 bit box. I discovered following behavior whereby the python process doesn't seem to release m

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Wong Wah Meng-R32813
Thanks for youre reply. I built python 2.7.1 binary myself on the HP box and I wasn't aware there is any configuration or setup that I need to modify in order to activate or engage the garbage collection (or even setting the memory size used). Probably you are right it leaves it to t

RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Wong Wah Meng-R32813
Wednesday, March 06, 2013 6:25 PM To: python-list@python.org Cc: python-list@python.org Subject: Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) On Wednesday, March 6, 2013 10:11:12 AM UTC, Wong Wah Meng-R32813 wrote: > Hello there, > > >

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Terry Reedy
On 3/6/2013 5:11 AM, Wong Wah Meng-R32813 wrote: Hello there, I am using python 2.7.1 built on HP-11.23 a Itanium 64 bit box. I discovered following behavior whereby the python process doesn't seem to release memory utilized even after a variable is set to None, and "deleted"

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Bryan Devaney
On Wednesday, March 6, 2013 10:11:12 AM UTC, Wong Wah Meng-R32813 wrote: > Hello there, > > > > I am using python 2.7.1 built on HP-11.23 a Itanium 64 bit box. > > > > I discovered following behavior whereby the python process doesn't seem to > release me

Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-06 Thread Wong Wah Meng-R32813
Hello there, I am using python 2.7.1 built on HP-11.23 a Itanium 64 bit box. I discovered following behavior whereby the python process doesn't seem to release memory utilized even after a variable is set to None, and "deleted". I use glance tool to monitor the memory utilized

import _tclinter error in python 2.7.1 Itanium build

2011-11-23 Thread Wong Wah Meng-R32813
Hello there, I am in the midst of converting my application code from python 1.5.2 to python 2.7.1. In the build of my python 2.7.1 on Itanium 64-bit HP11.3 platform, I noticed my Tkinter module was built and linked successfully, that I am able to import the module and use it. However, I just

Re: Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Gabriel Genellina
En Tue, 04 Oct 2011 07:32:41 -0300, Wong Wah Meng-R32813 escribió: Haha... yeah I reviewed the code, it is supposed to exposed some remote methods locally (RMI proxy usage). However, I am not sure why what it does is merely a pass. I commented out this code and haven't seen any negative

RE: Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Wong Wah Meng-R32813
exec() also not used in python 2.7.1 anymore? On Tue, Oct 4, 2011 at 12:51 AM, Wong Wah Meng-R32813 wrote: > In migrating my application from python 1.5.2 to 2.7.1, one of my modules > breaks when I import it. Here is the line where it breaks. Can I have a > quick check if this built-in

Re: Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Peter Otten
Wong Wah Meng-R32813 wrote: > In migrating my application from python 1.5.2 to 2.7.1, one of my modules > breaks when I import it. Here is the line where it breaks. Can I have a > quick check if this built-in function still supported in python 2.7.1 and > if so, what ought to be

Re: Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Chris Rebert
On Tue, Oct 4, 2011 at 12:51 AM, Wong Wah Meng-R32813 wrote: > In migrating my application from python 1.5.2 to 2.7.1, one of my modules > breaks when I import it. Here is the line where it breaks. Can I have a > quick check if this built-in function still supported in python 2.7.1 Er,

Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Wong Wah Meng-R32813
In migrating my application from python 1.5.2 to 2.7.1, one of my modules breaks when I import it. Here is the line where it breaks. Can I have a quick check if this built-in function still supported in python 2.7.1 and if so, what ought to be changed here? Thanks in advance for replying

RE: python 2.7.1 HP-UX 11 ia64 built not supporting thread

2011-09-28 Thread Wong Wah Meng-R32813
eate in -lpthread configure:8572: cc +DD64 -I/home/r32813/local/include -o conftest -g -L/home/r32813/local/lib -L/home/r32813/Build/2.7.1/Python-2.7.1 conftest.c -l nsl -lrt -ldld -ldl -lpthread >&5 Regards, Wah Meng Genesis Wafermap Support Ticket: To report a problem: http://dyno.fre

python 2.7.1 built not supporting thread?

2011-09-28 Thread Wong Wah Meng-R32813
Hello there, I couldn't detect this problem until I run my application that utilizes thread module in python that I just built on HP-UX 11.31 ia64 using aCC. Could it be the build did not include enable thread option? _REENTRANT as stated in the README file? If yes, it looks like threading may

RE: Error 'module' object has no attribute "_extension_registry" when cPickle is imported from an installed Python 2.7.1

2011-09-27 Thread Wong Wah Meng-R32813
[mailto:python-list-bounces+wahmeng=freescale@python.org] On Behalf Of Gabriel Genellina Sent: Wednesday, September 28, 2011 7:53 AM To: python-list@python.org Subject: Re: Error 'module' object has no attribute "_extension_registry" when cPickle is imported from an installed

Re: Error 'module' object has no attribute "_extension_registry" when cPickle is imported from an installed Python 2.7.1

2011-09-27 Thread Gabriel Genellina
$ python Python 2.7.1 (r271:86832, Sep 27 2011, 15:19:26) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. import cPickle Traceback (most recent call last): File "", line 1, in AttributeError: 'm

RE: Error 'No module named _sha256' when importing random in python 2.7.1

2011-09-27 Thread Wong Wah Meng-R32813
ct: Re: Error 'No module named _sha256' when importing random in python 2.7.1 On Tue, Sep 27, 2011 at 2:28 AM, Wong Wah Meng-R32813 wrote: > I just built python 2.7.1 on my HP Itanium 64-bit platform, using aCC. I > encountered following issue when importing the random module. D

Re: Error 'No module named _sha256' when importing random in python 2.7.1

2011-09-27 Thread Chris Rebert
On Tue, Sep 27, 2011 at 2:28 AM, Wong Wah Meng-R32813 wrote: > I just built python 2.7.1 on my HP Itanium 64-bit platform, using aCC. I > encountered following issue when importing the random module. Does anyone > know why am I getting this error? Thanks in advance for your reply.

Error 'No module named _sha256' when importing random in python 2.7.1

2011-09-27 Thread Wong Wah Meng-R32813
I just built python 2.7.1 on my HP Itanium 64-bit platform, using aCC. I encountered following issue when importing the random module. Does anyone know why am I getting this error? Thanks in advance for your reply. $ python Python 2.7.1 (r271:86832, Sep 27 2011, 15:19:26) [C] on hp-ux11 Type

Error 'module' object has no attribute "_extension_registry" when cPickle is imported from an installed Python 2.7.1

2011-09-27 Thread Wong Wah Meng-R32813
installed files (python and all its modules, shared library from default /use/local folder that contains bin, lib, include sub-folders) from "make install" command. Does anyone know why? Here is the error:- $ python Python 2.7.1 (r271:86832, Sep 27 2011, 15:19:26) [C] on hp-ux11

Python 2.7.1 64-bit Build on HP-UX11.31 ia64 with aCC - Many modules failed to build

2011-09-18 Thread Wong Wah Meng-R32813
and I believe its due to this error. When I manually execute ld without passing in +DD64 flag, the module is generated successfull. ld -b +DD64 -lxnet build/temp.hp-ux-B.11.31-ia64-2.7/home/r32813/Build/2.7.1/Python-2.7.1/Modules/mathmodule.o build/temp.hp-ux-B.11.31-ia64-2.7/home/r32813/Build/

Re: python 2.7.1 "serial" vs "pyserial"

2011-03-25 Thread eryksun ()
On 3/25/2011 7:27 AM, bruce bushby wrote: > > Is there any difference between the "serial" module in Python 2.7.1 and > "pyserial 2.5" ? I've never used it, but "pyserial" is actually "serial": http://pyserial.sourceforge.net I have

Re: python 2.7.1 "serial" vs "pyserial"

2011-03-25 Thread Terry Reedy
On 3/25/2011 7:27 AM, bruce bushby wrote: Hi Is there any difference between the "serial" module in Python 2.7.1 and "pyserial 2.5" ? When asking about 3rd party modules, it may help to give a reference to the site or download page on pypi. (And one should also check

python 2.7.1 "serial" vs "pyserial"

2011-03-25 Thread bruce bushby
Hi Is there any difference between the "serial" module in Python 2.7.1 and "pyserial 2.5" ? I can "import serial" without any issuesbut when I follow code examples my scripts complain: "TypeError: readline() takes no keyword arguments" However

Re: embedded python 2.7.1 slow startup

2011-03-08 Thread Terry Reedy
On 3/8/2011 4:06 AM, bruce bushby wrote: Hi I've been playing with running python on embedded linux. I thought I would run some "straces" to see how the install went when I noticed python attempts to "open" loads of files that don't exist.is there a way to prevent these "open" attemptsth

Re: embedded python 2.7.1 slow startup

2011-03-08 Thread Kushal Kumaran
On Tue, Mar 8, 2011 at 2:36 PM, bruce bushby wrote: > Hi > I've been playing with running python on embedded linux. I thought I would > run some "straces" to see how the install went when I noticed python > attempts to "open" > loads of files that don't exist.is there a way to prevent these "o

embedded python 2.7.1 slow startup

2011-03-08 Thread bruce bushby
Hi I've been playing with running python on embedded linux. I thought I would run some "straces" to see how the install went when I noticed python attempts to "open" loads of files that don't exist.is there a way to prevent these "open" attemptsthey're responsible for 40% of my scripts exe

Re: Darwin build error with MacPorts Python 2.7.1 installed.

2011-03-02 Thread Ned Deily
In article , Santoso Wijaya wrote: > I recently tried to play around with the latest source for Python-2.7.1, and > I came across this build error while trying to build a clean checkout (after > `./configure`, of course): > > bash-3.2$ make > ./Parser/asdl_c.py -h

Darwin build error with MacPorts Python 2.7.1 installed.

2011-03-02 Thread Santoso Wijaya
Hi, I recently tried to play around with the latest source for Python-2.7.1, and I came across this build error while trying to build a clean checkout (after `./configure`, of course): bash-3.2$ make ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl Traceback (most recent call last): File

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Benedict Verheyen
On 24/12/2010 2:16, Benedict Verheyen wrote: > On 23/12/2010 20:55, Stefan Sonnenberg-Carstens wrote: >>> I finally succeeded. I built ncurses and installed it to $HOME/usr/local ./configure --with-shared --enable-termcap --prefix=$HOME/usr/local make make install Then i built readline ./configu

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Benedict Verheyen
On 23/12/2010 20:55, Stefan Sonnenberg-Carstens wrote: >> >> > OK, I compiled it successfully under Debian 5.07 i386. > ncurses and libreadline are compiled from hand, both --prefix=$HOME/usr/local. > For python the only extra needed was export > LD_LIBRARY_PATH=$HOME/usr/local/lib:$LD_LIBRARY_PA

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Stefan Sonnenberg-Carstens
ut of make. This is the error for ncurses: building '_curses' extension gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/benedict/local/include -I. -IInclude -I./Include -I/usr/local/include -I/home/benedict/src/Python-2.7.1/Include

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Stefan Sonnenberg-Carstens
ut of make. This is the error for ncurses: building '_curses' extension gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/benedict/local/include -I. -IInclude -I./Include -I/usr/local/include -I/home/benedict/src/Python-2.7.1/Include

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Benedict Verheyen
and readline still fail to be built. I had a look at the output of make. This is the error for ncurses: building '_curses' extension gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/benedict/local/include -I. -IInclude -I./Inc

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Benedict Verheyen
On 23/12/2010 11:00, Stefan Sonnenberg-Carstens wrote: > apt-get build-dep python 2.6 > should do, the dependencies haven't changed (IMHO). > Then wipe away $HOME/usr/local (if you can, btw), > reset all env vars to default (perhaps reboot). > Then untar python from scratch, cd into that dir, and

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Stefan Sonnenberg-Carstens
of special interest. Btw, which Debian release are you running ? If the system is set up correctly it should not be necessary to change env vars to get it built. I use Debian stable so "apt-get build-dep python2.7" doesn't work. I removed all installed Python 2.7.1 files and so

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-23 Thread Benedict Verheyen
of special interest. > Btw, which Debian release are you running ? > If the system is set up correctly it should not be necessary to change env > vars to get it built. > > I use Debian stable so "apt-get build-dep python2.7" doesn't work. I removed all installe

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
On 22/12/2010 18:57, Jim Pharis wrote: > are you running make clean for good measure? Yes, i am. I am gong to try and uninstall Python2.7 from $HOME/local and see if that makes a difference. Maybe it interferes with the build process? Regards, Benedict -- http://mail.python.org/mailman/listinf

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Jim Pharis
are you running make clean for good measure? On Wed, Dec 22, 2010 at 3:33 AM, Benedict Verheyen < benedict.verhe...@gmail.com> wrote: > Hi, > > > i'm trying to compile Python 2.7.1 on Debian (Virtual Box). > Compiling end successfully but readline and curses fail to b

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 22.12.2010 09:33, schrieb Benedict Verheyen: Hi, i'm trying to compile Python 2.7.1 on Debian (Virtual Box). Compiling end successfully but readline and curses fail to build. I'm working with virtualenv and I install all my packages in $HOME/local. I've downloaded readlin

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
On 22/12/2010 9:33, Benedict Verheyen wrote: > Hi, > > > i'm trying to compile Python 2.7.1 on Debian (Virtual Box). > Compiling end successfully but readline and curses fail to build. > > I'm working with virtualenv and I install all my packages in $HOME/lo

compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
Hi, i'm trying to compile Python 2.7.1 on Debian (Virtual Box). Compiling end successfully but readline and curses fail to build. I'm working with virtualenv and I install all my packages in $HOME/local. I've downloaded readline, compiled and installed it in $HOME/local, sam

Re: Python 2.7.1

2010-11-30 Thread Antoine Pitrou
On Mon, 29 Nov 2010 15:11:28 -0800 (PST) Spider wrote: > > 2.7 includes many features that were first released in Python 3.1. The > > faster io module ... > > I understand that I/O in Python 3.0 was slower than 2.x (due to quite > a lot of the code being in Python rather than C, I gather), and t

Re: Python 2.7.1

2010-11-29 Thread Spider
> 2.7 includes many features that were first released in Python 3.1. The faster > io module ... I understand that I/O in Python 3.0 was slower than 2.x (due to quite a lot of the code being in Python rather than C, I gather), and that this was fixed up in 3.1. So, io in 3.1 is faster than in 3.0.

Re: Python 2.7.1

2010-11-29 Thread Terry Reedy
On 11/29/2010 6:51 AM, Kent Johnson wrote: On Nov 27, 11:33 pm, Benjamin Peterson wrote: On behalf of the Python development team, I'm happy as a clam to announce the immediate availability of Python 2.7.1. Will there be Mac binaries for 2.7.1 and 3.1.3? Currently the web site shows

Re: Python 2.7.1

2010-11-29 Thread Kent Johnson
On Nov 27, 11:33 pm, Benjamin Peterson wrote: > On behalf of the Python development team, I'm happy as a clam to announce the > immediate availability of Python 2.7.1. Will there be Mac binaries for 2.7.1 and 3.1.3? Currently the web site shows only source and Windows binaries. T

[RELEASED] Python 2.7.1

2010-11-27 Thread Benjamin Peterson
On behalf of the Python development team, I'm happy as a clam to announce the immediate availability of Python 2.7.1. 2.7 includes many features that were first released in Python 3.1. The faster io module, the new nested with statement syntax, improved float repr, set literals, dictionary

[RELEASED] Python 2.7.1 release candidate 1

2010-11-13 Thread Benjamin Peterson
On behalf of the Python development team, I'm chuffed to announce the a release candidate of Python 2.7.1. Please test the release candidate with your packages and report any bugs you find. 2.7.1 final is scheduled in two weeks. 2.7 includes many features that were first released in Pytho