#7417: disturbing notebook resource limit
------------------------+---------------------------------------------------
Reporter: was | Owner: boothby
Type: defect | Status: new
Priority: major | Milestone: sage-4.3
Component: notebook | Keywords:
Work_issues: | Author:
Reviewer: | Merged:
------------------------+---------------------------------------------------
Comment(by was):
A solution may be here: http://ubuntuforums.org/showthread.php?t=919340
They explain that {{{tempfile.mkstemp()}}} returns a file descriptor that
*must* be explicitly closed. They give sample code:
{{{
import sys
import os
import tempfile
import shutil
for idx in range(5000):
(outfd,outsock_path)=tempfile.mkstemp()
print "%(outsock_path)s"%locals()
try:
outsock=os.fdopen(outfd,'w')
except IOError,err:
print "IOError:",err
print "idx=%s"%idx
print "Cannot write to %(outsock_path)s"%locals()
sys.exit(1)
outsock.close()
os.remove(outsock_path)
}}}
Since the Sage notebook now uses tempfile, maybe our problem is the same.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7417#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---