Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10839

Inconsistencies with tab/space indentation between Cygwin/Win32?

From "Christian Gelinek" <cgelinek@radlogic.com.au>
Subject Inconsistencies with tab/space indentation between Cygwin/Win32?
Date 2011-08-04 13:55 +0930
Newsgroups comp.lang.python
Message-ID <mailman.1875.1312432561.1164.python-list@python.org> (permalink)

Show all headers | View raw


Hi all,

I have a problem running some python program using version 2.6.4 (or version
2.7.2, I tried both) from the Win7 command line - it never finishes due to
an infinite loop. The thing is, when I run the same program through Cygwin
which uses Python version 2.6.5, it exits the loop at some point.

I came to try this after I realised that in some of the sources (it is a
rather big program using many source files, most of them being created by
others from a Linux environment), the indentation is mixed tabs/spaces where
the assumed tab size is 8 spaces.

Reading on the Python website, a tab size of 8 is default anyway, so I would
have assumed it should work... does that mean that one tab equals 2
indents?!? I myself never use tabs to indent Python code but let my editor
do a tab-to-4-spaces conversion when I press <TAB>.

I find it at least confusing to read that Python expects a tab size of 8 but
at the same time uses 4 spaces for one indent level. Or maybe I am
completely on the wron track here?

Any ideas on how to get the thing to run under (real) Windows, hopefully
without having to edit existing sources of people who left our company ages
ago?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Inconsistencies with tab/space indentation between Cygwin/Win32? "Christian Gelinek" <cgelinek@radlogic.com.au> - 2011-08-04 13:55 +0930
  Re: Inconsistencies with tab/space indentation between Cygwin/Win32? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-08-04 07:18 +0200
  Re: Inconsistencies with tab/space indentation between Cygwin/Win32? Nobody <nobody@nowhere.com> - 2011-08-04 22:35 +0100

csiph-web