[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-01 Thread Okko Willeboordse
Okko Willeboordse added the comment: I did a gc.get_objects() before and after platform.win32_ver() and printed objects that were not present before calling platform.win32_ver(). If I run platform.win32_ver() in a loop I see the memory increasing. On 1 September 2016 at 17:35, STINNER Victor

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-01 Thread Okko Willeboordse
New submission from Okko Willeboordse: Running; Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32 platform.win32_ver() returns; ('10', '10.0.10586', '', u'Multiprocessor Free') -- components: Windows files: leaked_objects.txt messages

Event::wait with timeout gives delay

2014-02-09 Thread Okko Willeboordse
Running Python 2.6 and 2.7 on Windows 7 and Server 2012 Event::wait causes a delay when used with a timeout that is not triggered because event is set in time. I don't understand why. Can someone explain? The following program shows this; '''Shows that using a timeout in Event::wait (same for

[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2011-12-01 Thread Okko Willeboordse
Okko Willeboordse okko.willeboor...@gmail.com added the comment: I bumped into this issue at one of my customers that use Python to control a machine through Beckhoff EtherCAT. The Python code communicates with the Beckhoff EtherCAT program using TCP/IP. They use non blocking sockets like so

SocketServer.ThreadingTCPServer accepts clients outside server_forever

2008-11-09 Thread Okko Willeboordse
Hello, SocketServer.ThreadingTCPServer accepts connections (clients can connect) before and after it's server_forever method is called, see below for an example. IMHO it should only accept connections while server_forever is running. Kind regards, Okko Example, both _socket.connect calls

SocketServer shutdown deadlock

2008-11-06 Thread Okko Willeboordse
All, With Python 2.5 SocketServer features the shutdown method that can be called from another thread to stop the serve_forever loop. However; When the shutdown method is called before serve_forever, shutdown will never return. This can happen when a server is stopped during startup. In other

Re: SocketServer shutdown deadlock

2008-11-06 Thread Okko Willeboordse
If I wait until _BaseServer__serving is True before calling shutdown things go better. Okko Willeboordse wrote: All, With Python 2.5 SocketServer features the shutdown method that can be called from another thread to stop the serve_forever loop. However; When the shutdown method

Re: Get code object of class

2008-10-11 Thread Okko Willeboordse
Thanks, Why do you even need the classes code object anyway? I need to instantiate and use the class in another process. This other process doesn't has access to the py or pyc file holding the m_class (source) code so I can't use pickle. Something like; In the first process (that has access to

Get code object of class

2008-10-10 Thread Okko Willeboordse
To get the code object c of my_class I can do; c = compile(inspect.getsource(my_class), script, exec) This fails when inspect can't get hold of the source of my_class, for instance when my_class is in a pyc file. Is there another way of getting c? --

Pychecker

2006-12-15 Thread Okko Willeboordse
I execfile some script from another script like below i = 5 execfile(script) script uses i Running script standalone as well as running script through pychecker is not possible because script expects i I still need to run script through pychecker. I must do that from the calling script since