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

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
concerns and release the allocation when I issue gc.collect() or the gc.collect() takes place. :) On Thu, Mar 7, 2013 at 5:33 PM, Wong Wah Meng-R32813 r32...@freescale.com wrote: [] The example is written for illustration purpose. Thanks for pointing out a better way of achieving

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 by this 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
, 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, I am using python 2.7.1 built

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
=freescale@python.org] On Behalf Of Terry Reedy Sent: Wednesday, March 06, 2013 7:00 PM To: 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 3/6/2013 5:11 AM, Wong Wah Meng-R32813 wrote: Hello there, I am using python

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

Socket Error : Address still in use (Conveting from python 1.5.2 to 2.7.1)

2012-03-27 Thread Wong Wah Meng-R32813
Hello there, I am in the midst of converting my application from python 1.5.2 to python 2.7.1 on HP-UX 11 Itanium box. My application server will set a listening port, accepting request from multiple clients. The code just works fine in the old python environment. E.g. when I do a lsof |

Timeout when calling COM objects on Windows

2011-12-23 Thread Wong Wah Meng-R32813
Hello there, I am converting my VB ActiveX application written sometime back in year 2000 with python 1.5.2 to run in python 2.7.1. My application is using RMI architecture and I am using a pythonOleRmi.py parser to exchange data/objects between the python and the VB exe. I have no issue

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: socket.getsockname is returning junk!!

2011-10-07 Thread Wong Wah Meng-R32813
@python.org] On Behalf Of Gabriel Genellina Sent: Friday, October 07, 2011 5:37 PM To: python-list@python.org Subject: Re: socket.getsockname is returning junk!! En Wed, 05 Oct 2011 08:56:08 -0300, Wong Wah Meng-R32813 r32...@freescale.com escribió: I am migrating my application from

ImportError: No module named _sha256

2011-10-05 Thread Wong Wah Meng-R32813
Hello there, In migrating my application from python 1.5.2 to 2.7.1, I encountered an issue modules which utilizes _sha256 cannot be loaded. This includes hashlib, random and tempfile. I think this should be related to the build of my python 64-bit on HP11.31 using HP-UX compiler. I have

socket.getsockname is returning junk!!

2011-10-05 Thread Wong Wah Meng-R32813
Hello guys, I am migrating my application from python 1.5.2 to 2.7.1. One of the existing code breaks. The getsockname method from socket object somehow returns me with some number which I deem as junk, rather than the listening port as I would have expected in the older python. Has anyone

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: Is exec() also not used in python 2.7.1 anymore?

2011-10-04 Thread Wong Wah Meng-R32813
error I see is due to I commented out this code. Thanks! Regards, Wah Meng -Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Tuesday, October 04, 2011 4:26 PM To: Wong Wah Meng-R32813 Cc: python-list@python.org Subject: Re: Is exec

Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-03 Thread Wong Wah Meng-R32813
Hello guys, I am migrating my application from python 1.5.2 to 2.7.1. I encountered an error when I run some commands (I put in debug statement however, not able to trace down to which line of code that cause it to generate a lot of messages in one second until my hard disk space is full. The

RE: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-03 Thread Wong Wah Meng-R32813
Noted. No choice then, I will convert all my raise statement to use the exception instance. Thanks! Regards, Wah Meng -Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Monday, October 03, 2011 3:46 PM To: Wong Wah Meng-R32813 Cc

RE: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-03 Thread Wong Wah Meng-R32813
, October 03, 2011 3:44 PM To: python-list@python.org Subject: Re: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str On Mon, 03 Oct 2011 06:45:25 +, Wong Wah Meng-R32813 wrote: Does it mean in newer python I need to migrate all my

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

2011-09-28 Thread Wong Wah Meng-R32813
Sep 2011 06:08:54 -0300, Wong Wah Meng-R32813 r32...@freescale.com escribió: Hello all, I encounter this issue whereby I am not able to load cPickle module into the python I newly built. There is no issue when I load it right from the folder where the python executable and libpython2.7

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

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

2011-09-28 Thread Wong Wah Meng-R32813
Wah Meng-R32813 Sent: Wednesday, September 28, 2011 4:37 PM To: python-list@python.org Subject: python 2.7.1 built not supporting thread? 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

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
Hello all, I encounter this issue whereby I am not able to load cPickle module into the python I newly built. There is no issue when I load it right from the folder where the python executable and libpython2.7.so is built. However, it gives me this error when I load the same module using the

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

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

2011-09-27 Thread Wong Wah Meng-R32813
termios Regards, Wah Meng -Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Tuesday, September 27, 2011 5:52 PM To: Wong Wah Meng-R32813 Cc: python-list@python.org Subject: Re: Error 'No module named

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
Hello there, I have posted this in Compiler SIG and re-post here in case anyone who knows about this issue is not subscribed to that group. I am working on python build on my server using HP-UX ANSI C Compiler. I want to be consistent using aCC throughout instead of gcc for my python and