On Feb 01, 2010, at 08:26 AM, Tim Delaney wrote:

>The pyc/pyo files are just an optimisation detail, and are essentially
>temporary. Given that, if they were to live in a single directory, to me it
>seems obvious that the default location for that should be in the system
>temporary directory. I an immediately think of the following advantages:
>
>1. No one really complains too much about putting things in /tmp unless it
>starts taking up too much space. In which case they delete it and if it gets
>reused, it gets recreated.

IIUC the Filesystem Hierarchy Standard correctly, then these files really
should go under /var/cache/python.  (Don't ask me where that would be on
non-FHS compliant systems <cough>Windows</cough>).  I've explained in other
followups why I don't particularly like separating the source from the cache
files though, but if you wanted a sick approach:

Take the full absolutely path to the .py file, plus the magic number, plus the
time stamp and hash that.  Cache the pyc file under /var/cache/python/<hash>.

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to