On Windows, TeX systems deliberately disable writing of executable file types (which are extension-based) via\write
operations. Thus you cannot create a file called foo.py
if .py
files are set up to be executable. The common case for this problem is batch (.bat
) files, which are plain text but executable without any add-ons and thus 'forbidden'. With \write18
enabled, the easiest approach is to write to an alternative file name then use use the shell escape to rename the file, which is allowed as \write18
is 'do whatever you want'.
↧
Answer by Joseph Wright for python.sty on TeX Live 2013 - Forbidden to open for writing error
↧