bug in python/numarray

2005-08-02 Thread meng
Hi, there, I got different results by running the same lines of code on windows and debian. Here is the code: a = kroneckerproduct(ones((4195,1)), identity(12)) print a.mean() This works perfectly well in windows but it gave the following error while running it in debian: Traceback (most recen

Cloud platform with GPU

2018-11-09 Thread denis meng
Good day all, I am looking for a good cloud platform to do all my python development for machine learning with GPU availability, so far I have used Amazon ec2, google colab, kaggle etc but none of them was very satisfactory. Anyone has good experience with other options? please share and TIA Den

Are there something like "Effective Python"?

2006-06-01 Thread Mike Meng
Hi all, I just finished reading Learning Python 3rd ed, and am doing my first Python application, which retrieves and process text and XML documents from Web. Python helped me to write the application in a few hours, I'm very happy with its productivity. But the performance is not satisfacto

Re: Are there something like "Effective Python"?

2006-06-02 Thread Mike Meng
Bart, I'm sorry, it's 2nd edtion. Thanks. mike BartlebyScrivener 写道: > >> I just finished reading Learning Python 3rd ed, > > For real? I thought there was only a 2nd edition. > > http://www.oreilly.com/catalog/lpython2/ -- http://mail.python.org/mailman/listinfo/python-list

[twisted] PyOpenSSL and PyCrypto are outdated!

2006-06-05 Thread Mike Meng
Hi all, I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32 installer on http://twisted.sourceforge.net/contrib/ . But I find the lastest version are for Python 2.3. I try to rebuild pyOpenSSL from source, but get lots of compile errors. Are these two packages obsolated? Where ca

Re: PyOpenSSL and PyCrypto are outdated!

2006-06-05 Thread Mike Meng
n x509v3.h. My C++ compiler is Visual C++ 7.1. Should I use older OpenSSL release? Terry Reedy 写道: > "Mike Meng" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32 > >

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

2012-03-27 Thread Wong Wah Meng-R32813
ODELAY, 1 ) self.sock.connect( self.server_address ) Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

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 cx_O

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 in

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 "h

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

2011-09-27 Thread Wong Wah Meng-R32813
o build these modules: _ctypestermios 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 Subje

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
Thanks Gabriel, Indeed, there is corrupted copy_reg.py file residing in my $PYTHONPATH folder, as opposed to the standard one from the installed package. Thanks a lot for your helps! Regards, Wah Meng -Original Message- From: python-list-bounces+wahmeng=freescale@python.org

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: 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 Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-02 Thread Wong Wah Meng-R32813
x27;,)) Does it mean in newer python I need to migrate all my Exception to non-string based exception type? That's should be a lot of changes. :p Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

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
I see. Thanks for the tips. If I run out of time I shall consider only using 2.5. Regards, Wah Meng -Original Message- From: python-list-bounces+wahmeng=freescale@python.org [mailto:python-list-bounces+wahmeng=freescale@python.org] On Behalf Of Steven D'Aprano Sent: M

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

2011-10-04 Thread Wong Wah Meng-R32813
. exec('def %s(self, *args, **kw): pass'%methodStrName) SyntaxError: unqualified exec is not allowed in function '_exposeMethods' it contains a nested function with free variables Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

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

2011-10-04 Thread Wong Wah Meng-R32813
next 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

ImportError: No module named _sha256

2011-10-05 Thread Wong Wah Meng-R32813
_func_name) File "/home/r32813/genesis/GEN_DEV_271/Enablers/Python/lib/python2.7/hashlib.py", line 74, in __get_builtin_constructor import _sha256 ImportError: No module named _sha256 >>> Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

socket.getsockname is returning junk!!

2011-10-05 Thread Wong Wah Meng-R32813
gt; server_address=('zmy02hp3', 1) >>> sock.bind(server_address) >>> sock.getsockname() (0, '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') In python 1.5.2 >>> server_address=('zmy02aix04', 1) >>> sock.bind(server_address) >>> sock.getsockname() ('10.228.51.41', 1) >>> Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

RE: socket.getsockname is returning junk!!

2011-10-07 Thread Wong Wah Meng-R32813
of the process and wasn't aware it was essential as excluding it cost me the junk I was seeing. Problem solved!! Thanks a lot for reverting. :) Regards, Wah Meng -Original Message- From: python-list-bounces+wahmeng=freescale@python.org [mailto:python-list-bounces+wahmeng=free

import _tclinter error in python 2.7.1 Itanium build

2011-11-23 Thread Wong Wah Meng-R32813
call last): File "", line 1, in File "Tclinter.py", line 5, in import _tclinter # If this fails your Python is not configured for Tcl ImportError: No module named _tclinter >>> import _tclinter Traceback (most recent call last): File "&quo

Timeout when calling COM objects on Windows

2011-12-23 Thread Wong Wah Meng-R32813
questReply reply = self._receive() File "C:\genesis\Product\Lib\RMI.py", line 1677, in _receive raise ServerReplyTimeout( self.reply_timeout) ServerReplyTimeout: 300 Regards, Wah Meng -- http://mail.python.org/mailman/listinfo/python-list

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
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 Wong Wah Meng-R32813
he OS itself (in this case HP-UX) to clean it up as after python removes the reference to the address of the variables the OS still thinks the python process should still owns it until the process exits. Regards, Wah Meng -Original Message- From: Python-list [mailto:python-list-bounces+wa

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-08 Thread Wong Wah Meng-R32813
nd my 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 wrote: > [] The example is written for illustration purpose. Thanks for > pointing out a better way of achieving the same res

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