discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Strange indentation space in python script


From: Tim Meehan
Subject: Re: [Discuss-gnuradio] Strange indentation space in python script
Date: Wed, 14 Apr 2010 21:57:48 -0700

Should you use vi (vim) the following in your .vimrc file should display tabs as 4 spaces and more importantly insert 4 spaces instead of a tab when you hit the tab key.  

set ts=4
set shiftwidth=4
set expandtab


On Tue, Apr 13, 2010 at 7:51 AM, Johnathan Corgan <address@hidden> wrote:
On Tue, Apr 13, 2010 at 06:20, Tim Pearce <address@hidden> wrote:

> Checking it on my copy here it looks like the script is playing the
> dangerous game of mixing tabs + spaces so the actual indentation you see on
> your text editor depends on how it treats tabs. Whether it works or not then
> depends on how python chooses to treat the tabs.

I'll fess up to having committed such Python treachery by having made
some of those edits using an editor that didn't handle space/tabs
consistently.  I have since learned the error of my ways and have gone
down the Emacs path to redemption :-)

Seriously, though, it's one of the few downsides to Python, but an
important one--multiple developers should standardize on an editor to
avoid issues like this.  Most of the code in GNU Radio has been
written in Emacs.

Johnathan


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]