A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-October/105092.html below:

[Python-Dev] closing files and sockets in a timely manner in the stdlib

[Python-Dev] closing files and sockets in a timely manner in the stdlib [Python-Dev] closing files and sockets in a timely manner in the stdlibJack Diederich jackdied at gmail.com
Sat Oct 30 20:39:35 CEST 2010
On Fri, Oct 29, 2010 at 8:35 PM, Brett Cannon <brett at python.org> wrote:
> For those of you who have not noticed, Antoine committed a patch that
> raises a ResourceWarning under a pydebug build if a file or socket is
> closed through garbage collection instead of being explicitly closed.

Just yesterday I discovered /proc/<your PID here>/fd/ which is a list
of open file descriptors for your PID on *nix and includes all open
files, pipes, and sockets.  Very handy, I filed some tickets about
company internal libs that were opening file handles as a side effect
of import (logging mostly).  I tried to provoke standard python
imports (non-test) to leave some open handles and came up empty.

-Jack
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4