Menu

#721 pypiwin32: does not check existence of pywin32_system32 in path before setting

v1.0 (example)
open
None
5
2016-05-18
2016-05-18
No

on pypi, the packages have a line in the pywin32.pth file:
import os;os.environ["PATH"]+=(';'+os.path.join(sitedir,"pywin32_system32"))

however, when you have an application that reloads the modules without exiting the python process, this will cause the path to ultimately over-run the os.environ['PATH'] buffer.

The fix would be to change that line with:
import os;os.environ["PATH"]+=(';'+os.path.join(sitedir,"pywin32_system32")) if "pywin32_system32" not in os.environ["PATH"] else ''

ultimately when the buffer over-runs, all types of bad things happen to the running application.

Related

Old Bugs - new issues at https://github.com/mhammond/pywin32/issues: #740

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.