tags:

views:

97

answers:

2

Here are the top few lines (all comments) from a python application. What do the first two comment lines indicate? Are they special markers for another app?

# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Istanbul - A desktop recorder
# Copyright (C) 2005 Zaheer Abbas Merali (zaheerabbas at merali dot org)
# Portions Copyright (C) 2004,2005 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
+2  A: 

Its define tab size 4 spaces to text editors like vi

S.Mark
Thanks a bunch!
saidimu
+3  A: 

The first line is an emacs thing (although it may also be a vi thing). It basically tells it that it should use python-mode to read the file. You'll usually see this if the file ends in an extension other than .py.

As mentioned, the second line deals with spacings.

Jason Baker
That was easy. Thanks!
saidimu
Just for clarity, line 1 is an emacs "mode line", line 2 is a vi mode line. (That file has apparently been edited by user(s) of both editors.)
Travis Bradshaw