Python: Which command increases the number of open files on Windows?

末鹿安然 提交于 2020-05-12 07:11:29

问题


There seems to be lots of questions on this topic bit I can't seem to find what exactly I should call inside my python script to increase the open file limit ? I know that I need to use the _setmaxstdio on C level but I am not sure how to call it in python. Any ideas ?


回答1:


Try to use win32file from pywin32:

import win32file
print win32file._getmaxstdio() #512

win32file._setmaxstdio(1024)
print win32file._getmaxstdio() #1024


来源:https://stackoverflow.com/questions/24117273/python-which-command-increases-the-number-of-open-files-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!