Python- About File-handle Limits On OS
HI i wrote a program by python , and when i open too many tempfile, i will got an exception: Too many open files ... Then i figure out that windows OS or C runtime has the file-han
Solution 1:
Python's StringIO does not use OS file handles, so it won't be limited in the same way. StringIO will be limited by available virtual memory, but you've probably got heaps of available memory.
Normally the OS allows a single process to open thousands of files before running into the limit, so if your program is running out of file handles you might be forgetting to close them. Unless you're intending to open thousands of files and really have just run out, of course.
Post a Comment for "Python- About File-handle Limits On OS"