Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Is there a way to configure IDLE to use spaces instead of tabs for indenting?

Reply
Thread Tools

Is there a way to configure IDLE to use spaces instead of tabs for indenting?

 
 
Alex
Guest
Posts: n/a
 
      09-07-2012
Terry Reedy wrote:

[snip]

> IDLE is not the interpreter.


Fine, I meant shell. Thanks for fixing that for me.

> The IDLE Shell is intended mainly for single-line inputs.


Maybe it should be limited to that, then. That way stoopid noobs like
me don't use it wrong and then use the wrong nomenclature to complain
about it.

> For more than a three-line compound statement, I use the editor with
> a scratchpad file where editing is much easier.


Great tip, thanks. That's how I'll do it from now on.


 
Reply With Quote
 
 
 
 
Fabio Zadrozny
Guest
Posts: n/a
 
      10-17-2012
On Thu, Sep 6, 2012 at 10:43 AM, Alex <(E-Mail Removed)> wrote:
> Ramchandra Apte wrote:
>
>> On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
>> > I'm new to Python and have been using IDLE 3.2.3 to experiment with
>> >
>> > code as I learn. Despite being configured to use a 4 space
>> > indentation
>> >
>> > width, sometimes IDLE's "smart" indentation insists upon using
>> > width-8
>> >
>> > tabs.
>> >
>> >
>> >
>> > From what I've been able to find on Google, this is due to a
>> >
>> > shortcoming in Tk. While it's not that big a deal in the grand
>> > scheme
>> >
>> > of things, I think it looks like poop, and I'd like to change IDLE
>> > to
>> >
>> > use 4-space indentation instead of tabs for all indentation levels.
>> >
>> >
>> >
>> > Is there any way for me to achieve what I want in IDLE, or do I
>> > have to
>> >
>> > start up my full-blown IDE if I want consistent 4-space indentation?
>> >
>> >
>> >
>> > Alex

>>
>> I think an IDE is better than IDLE. Try NINJA IDE.
>> http://ninja-ide.org

>
> Agreed. I like PyDev in Eclipse, but sometimes I just want to try out
> something quick in the interpreter, to ensure I understand it or do a
> quick experiment. Since indentation is syntactically significant in
> Python, I think fixing the interpreter to produce good, readable,
> cut-and-pasteable, and Pythonic code is more important than a cosmetic
> feature, but less important than true bugs.
> --



Actually, if you're in PyDev/Eclipse already, you can just use the
interactive shell that PyDev provides:
http://pydev.org/manual_adv_interactive_console.html

Cheers,

Fabio
 
Reply With Quote
 
 
 
 
Alex
Guest
Posts: n/a
 
      10-17-2012
Fabio Zadrozny wrote:

> On Thu, Sep 6, 2012 at 10:43 AM, Alex <(E-Mail Removed)> wrote:
> > Ramchandra Apte wrote:
> >
> >> On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote:
> >> > I'm new to Python and have been using IDLE 3.2.3 to experiment

> with >> >
> >> > code as I learn. Despite being configured to use a 4 space
> >> > indentation
> >> >
> >> > width, sometimes IDLE's "smart" indentation insists upon using
> >> > width-8
> >> >
> >> > tabs.
> >> >
> >> >
> >> >
> >> > From what I've been able to find on Google, this is due to a
> >> >
> >> > shortcoming in Tk. While it's not that big a deal in the grand
> >> > scheme
> >> >
> >> > of things, I think it looks like poop, and I'd like to change

> IDLE >> > to
> >> >
> >> > use 4-space indentation instead of tabs for all indentation

> levels. >> >
> >> >
> >> >
> >> > Is there any way for me to achieve what I want in IDLE, or do I
> >> > have to
> >> >
> >> > start up my full-blown IDE if I want consistent 4-space

> indentation? >> >
> >> >
> >> >
> >> > Alex
> > >
> >> I think an IDE is better than IDLE. Try NINJA IDE.
> >> http://ninja-ide.org

> >
> > Agreed. I like PyDev in Eclipse, but sometimes I just want to try
> > out something quick in the interpreter, to ensure I understand it
> > or do a quick experiment. Since indentation is syntactically
> > significant in Python, I think fixing the interpreter to produce
> > good, readable, cut-and-pasteable, and Pythonic code is more
> > important than a cosmetic feature, but less important than true
> > bugs.
> > --

>
>
> Actually, if you're in PyDev/Eclipse already, you can just use the
> interactive shell that PyDev provides:
> http://pydev.org/manual_adv_interactive_console.html
>
> Cheers,
>
> Fabio


Awesome. Exactly what I was looking for. Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabs -vs- Spaces: Tabs should have won. rantingrick Python 95 07-18-2011 11:07 PM
How do you configure IDLE on a Mac, seeing as there's no ConfigureOption... Mensanator Python 12 01-06-2010 02:51 AM
Difficulty with "inconsistent use of tabs and spaces in indentation"in file called <string> ibloom Python 12 02-13-2008 03:46 PM
CSV::Writer... Using tabs instead of commas (or creating excel file using tabs to seperate data) John Kopanas Ruby 2 01-29-2007 06:26 PM
How to use split on spaces AND tabs? nospam Perl 2 07-03-2004 09:23 PM



Advertisments