On my machine Linux machine ulimit -n gives 1024. This code:
ulimit -n
1024
from tempfile import mkstemp for n in xrange(1024 + 1): f, path =
import tempfile import os for idx in xrange(1024 + 1): outfd, outsock_path = tempfile.mkstemp() outsock = os.fdopen(outfd,'w') outsock.close()