install complains about 'invalid' Python files
Hi, I hope this is the proper list for my question, or at least for my suggestion. I have a Python product which contains Python scripts (*.py) and DTML methods (*.dtml) which can get used by the user to create certain standard versions of e.g. generated menus etc.; the ZODB objects can then be customized. The templates are located in a certain subdirectory of my product. This works fine. When I run the Zope install script on a freshly installed Zope, and my Product is already there, it complains that the *.py scripts (aimed for import) would be invalid, because there are return-, but no def statements. Thus, installation fails; I must first remove my product. My question: is it possible to tell the install script not to compile a certain directory subtree, e.g. placing a certain file somewhere? My suggestion: if there is no possiblity yet, it would be great if it would come in a future version. tia, Tobias http://www.apriori.de --
THerp@apriori.de wrote:
When I run the Zope install script on a freshly installed Zope, and my Product is already there, it complains that the *.py scripts (aimed for import) would be invalid, because there are return-, but no def statements. Thus, installation fails; I must first remove my product.
This may be completely daft, but my first reaction is that files with Zope python scripts maybe should have separate file extentions, since they aren't valid python files. .pys, maybe?
You cannot rely on the Zope install script to handle add-on products well, if at all. The same issue wrt .py extensions is present in the CMF skins. So I guess the answer is: "Don't do it that way". They are called add-on products for a reason ;-) Stefan --On Donnerstag, 13. März 2003 14:00 +0100 THerp@apriori.de wrote:
When I run the Zope install script on a freshly installed Zope, and my Product is already there, it complains that the *.py scripts (aimed for import) would be invalid, because there are return-, but no def statements. Thus, installation fails; I must first remove my product.
My question: is it possible to tell the install script not to compile a certain directory subtree, e.g. placing a certain file somewhere?
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
participants (3)
-
Lennart Regebro -
Stefan H. Holek -
THerp@apriori.de