Sharky at Code Zone
sharky at codezone.ath.cx
Mon Jul 12 03:19:53 EDT 2004
A Seg, 2004-07-12 às 01:44, Daniel Popowich escreveu: > > In your example of mps_tutorial, all _files.py ('.py') are compiled and > > i think by default when you run for the first time. > > > > But imagine you exemple with some diffs.: > > 1- tutorial instaled and configured in: /var/www/mps_tutorial/ > > 2- all your _*.py are in: /var/www/mps_tutorial/pyfiles/ > > 3- all your *.mps are in: /var/www/mps_tutorial/ > > 4- you have a __init__.py in /var/www/mps_tutorial/ with __vars__ = > > ["pyfiles"] > > 5- you have a __init__.py in /var/www/mps_tutorial/pyfiles with > > __vars__ = ["_SitePage", "_TutorialBase", "_HTML", "_HTMLHighlightedPy"] > > I have never heard of __vars__. Do you mean __all__? Regardless, > this should have no impact on the generation of pyc files. __all__, not __vars__ sorry my mistake... > > In your index.mps you have something like: > > from pyfiles._TutorialBase import * > > > > It works fine but dont creat any .pyc of *.py... why not? > > When python imports a module and the pyc file does not exist it tries > to create it, and will, if the process has write permissions to the > directory containing the py file. > > Does the directory you've created, pyfiles, allow write permissions to > the httpd process uid? You have rigth... the directory don's allow write permissions to my http process. Many thanks Sharky -------------- next part -------------- An HTML attachment was scrubbed... URL: http://modpython.org/pipermail/mod_python/attachments/20040712/ccf34906/attachment.html
|