Changes between Version 4 and Version 5 of ChimeraPythonStyle


Ignore:
Timestamp:
Feb 2, 2011, 11:26:06 AM (15 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraPythonStyle

    v4 v5  
    1414}}}
    1515
    16 Another way to code a style is to add a style note to the top of each file, e.g.:
     16It's possible to insert a mode line into each file to override user editor settings.  The first line of the file might contain something like this (which should work for both emacs and vim):
    1717{{{
    18 # -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=python:et:sw=4:ts=4:sts=4
     18# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=python:et:sw=4:ts=4:sts=4:fdm=indent:fo+=croql
    1919}}}
    2020
    21 For emacs, here's a good blog on useful python tools: http://jasonmbaker.com/7-tools-for-working-with-python-in-emacs-and.
    22 
    23 It's possible to insert a mode line into each file to override user editor settings.  The first line of the file might contain something like this (which should work for both emacs and vim):
     21Note that the encoding (coding) is utf-8 here, which is recommended for python 3.x, but earlier versions are recommended to use ISO-8859-1, so the PEP8 recommends a mode line like this:
    2422{{{
    2523# -*- coding: ISO-8859-1; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=ISO-8859-1:ft=python:et:sw=4:ts=4:sts=4
    2624}}}
    2725
     26For emacs, here's an interesting blog on useful python tools: http://jasonmbaker.com/7-tools-for-working-with-python-in-emacs-and.
     27
     28== [http://www.python.org/dev/peps/pep-0008/ PEP8 Snippets] ==
     29
    2830{{{
    29 ### BEGIN PEP8 snippet:
    3031Indentation
    3132
     
    5758    UTF-8 is preferred over Latin-1, see PEP 3120.
    5859
    59 
    60 ### END PEP8 snippet:
    6160}}}