~ubuntu-branches/ubuntu/utopic/dogtail/utopic

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-12-21 13:33:47 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20061221133347-xo9jg11afp5plcka
Tags: upstream-0.6.1
ImportĀ upstreamĀ versionĀ 0.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
 
6
6
== Formatting ==
7
 
We use tabs rather than spaces in the Dogtail python sources
8
 
 
9
 
If you don't know how to make your editor use tabs, here are some 
10
 
instructions. Note that you can replace '4' with '2' '8' or
11
 
any other number, but make sure to change it in both places.
12
 
 
13
 
Put this in your ~/.vimrc:
14
 
set tabstop=4
15
 
set shiftwidth=4
16
 
set noexpandtab
17
 
 
18
 
 
19
 
Put this in your ~/.emacs:
20
 
(defun custom-python-mode ()
21
 
        ;; The following two variables must be equal for...
22
 
        (setq tab-width 4)
23
 
        (setq py-indent-offset 4)
24
 
 
25
 
        ;; The following setting to be actually respected:
26
 
        ;; Use tabs for indentation in Python mode
27
 
        (setq indent-tabs-mode t))
28
 
(add-hook 'python-mode-hook 'custom-python-mode)
29
 
 
 
7
We use 4 spaces for indentation.
30
8
 
31
9
== Python versions ==
32
10
We're trying to support both Python 2.3 and Python 2.4