Terry Westley wrote:
PEP 304 was withdrawn, but those of us embedding Python need a way to put .py files in read-only memory and .pyc files in a separate writable directory. Short of resurrecting PEP 304, is there a known mod that I could use for this purpose?
My situation is an iPhone/iPad app (http://www.sabonrai.com/PythonMath/). Python source files need to be part of the app bundle which is in a non-writable directory. I've found that even compiling all the .py files doesn't work because the interpreter wants to rebuild .pyc files for certain modules and I get an unlink deny error for them.
This should help :-)
python -h usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... Options and arguments (and corresponding environment variables): -B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Oct 18 2011)
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/