Allow user to specify the lexer's "taboutputdir"
Created originally on Bitbucket by Anonymous
For example:
_parser_cache = None
...
taboutputdir=None def _get_parser(): global _parser_cache if _parser_cache is None: _parser_cache = pycparser.CParser(taboutputdir=taboutputdir) return _parser_cache
Then I can
import cffi
cffi.taboutputdir = "~/user-safe-place"
As opposed to the default which may try to write files to locations the user does not have permissions to. Right now, it's basically impossible to package programs that use cffi for binary distribution on many platforms... because pycparser will try to scribble to odd disk locations every time you start up.