On Thu, May 05, 2005 at 01:00:55PM +0200, SER.RI-TIC-Alexis Roda wrote:
> Dave Whiteley wrote:
> >Hello,
> >Firstly, my xemacs did not recognise my Script(Python) files as being
> >Python, and so it does not automatically switch to Python Major Mode.  
> >
> >I added the standard shebang "#! /usr/bin/python" to the start of the
> >file which fixed this. However it would be nice if it were to
> >recognise Zope's script preamble.  Please could someone point me at a
> >resource to help me configure my Xemacs for this.
> xemacs probably relies on file extension to decide the mode. Just rename 
> your scripts and add a .py extension (not a good idea, since . is 
> meaningful for python)

When I have created scripts in the web interface I have just accepted
the defaults, and so I presume that the scripts are buried in the ZDB,
rather than being actual files. Should I give them actual filenames
when I create them?

> or add something like (not tested):
> # Local Variables:
> # mode:python
> # End:

Thanks, magic!  That works.

Now if I can fix the file type problem....



Dave Whiteley
Phone +44 (0)113 343 2059
School of Electronic and Electrical Engineering
The University of Leeds. Leeds, LS2 9JT,  UK
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to