Re: DOS, UNIX and tabs

2007-01-26 Thread Steve Holden
Tim Roberts wrote: > "Ben" <[EMAIL PROTECTED]> wrote: >> Great - that worked.Thanks! >> Is that a general method in linux you can always use to redirect >> standard output to a file? > > Works in Windows, too. For some value of "work" :) regards Steve -- Steve Holden +44 150 684 7255 +

Re: DOS, UNIX and tabs

2007-01-03 Thread Hendrik van Rooyen
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > I've spent a lot of time reading both sides of the tabs versus spaces > argument, and I haven't found anything yet that explains why tabs are, in > and of themselves, bad. +1 for QOTW Searching for the "badness" of tabs is like searching for the hol

Re: DOS, UNIX and tabs

2007-01-02 Thread Tom Plunket
Peter Decker wrote: > > Maybe I'm also weird, but I use a variable-pitch font when programming > > in Python. So a "tab equals some number of spaces" really isn't useful > > to me. My setup is, "tab equals this much space". > > A year ago I would have thought you were weird, but after reading a

Re: DOS, UNIX and tabs

2007-01-02 Thread Neil Cerutti
On 2007-01-02, Peter Decker <[EMAIL PROTECTED]> wrote: > On 1/1/07, Tom Plunket <[EMAIL PROTECTED]> wrote: >> Maybe I'm also weird, but I use a variable-pitch font when >> programming in Python. So a "tab equals some number of >> spaces" really isn't useful to me. My setup is, "tab equals >> this

Re: DOS, UNIX and tabs

2007-01-02 Thread Peter Decker
On 1/1/07, Tom Plunket <[EMAIL PROTECTED]> wrote: > Maybe I'm also weird, but I use a variable-pitch font when programming > in Python. So a "tab equals some number of spaces" really isn't useful > to me. My setup is, "tab equals this much space". A year ago I would have thought you were weird,

Re: DOS, UNIX and tabs

2007-01-01 Thread Tom Plunket
Lawrence D'Oliveiro wrote: > I think there should be a single environment variable, perhaps > called "TABS", which specifies the tab settings across all relevant tools > that work with text, including less and diff. So for example setting this > as > > export TABS=4 > > will cause these tool

Re: DOS, UNIX and tabs

2006-12-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tom Plunket wrote: > Perhaps interestingly, for development I have my editor set to show tabs > as fairly short, but my diff program shows them as eight characters. I > find that makes indentation changes easier to spot in the diffs. I think there should be a sing

Re: DOS, UNIX and tabs

2006-12-31 Thread Tom Plunket
Marc 'BlackJack' Rintsch wrote: > >> Did you try to open your code files with another editor, which has a > >> different length for tabulator chars? It would look quite ugly, I > >> guess... > > > > Actually, no. Everyone can choose their own number of spaces-per-tab and > > it'll look right, as

Re: DOS, UNIX and tabs

2006-12-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Paul McNett > wrote: > >> Everyone can choose their own number of spaces-per-tab and >> it'll look right, as long as everyone uses a monospace font. > > You never tried that with tabs plus additional spaces

Re: DOS, UNIX and tabs

2006-12-31 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Paul McNett wrote: >> Did you try to open your code files with another editor, which has a >> different length for tabulator chars? It would look quite ugly, I >> guess... > > Actually, no. Everyone can choose their own number of spaces-per-tab and > it'll look right, as l

Re: DOS, UNIX and tabs

2006-12-30 Thread Paul McNett
Sebastian 'lunar' Wiesner wrote: > Paul McNett <[EMAIL PROTECTED]> typed > >> Steven D'Aprano wrote: >>> But I think we all agree that mixing tabs and spaces is A Very Bad >>> Thing. >> I like mixing tabs and spaces, actually. Tabs for indentation, and >> additional spaces to make the code "look p

Re: DOS, UNIX and tabs

2006-12-30 Thread Sebastian 'lunar' Wiesner
Paul McNett <[EMAIL PROTECTED]> typed > Steven D'Aprano wrote: >> But I think we all agree that mixing tabs and spaces is A Very Bad >> Thing. > > I like mixing tabs and spaces, actually. Tabs for indentation, and > additional spaces to make the code "look pretty". Somebody please tell > me why t

Re: DOS, UNIX and tabs

2006-12-29 Thread Tim Roberts
"Ben" <[EMAIL PROTECTED]> wrote: > >Great - that worked.Thanks! >Is that a general method in linux you can always use to redirect >standard output to a file? Works in Windows, too. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-

Re: DOS, UNIX and tabs

2006-12-29 Thread Paul McNett
Steven D'Aprano wrote: > But I think we all agree that mixing tabs and spaces is A Very Bad Thing. I like mixing tabs and spaces, actually. Tabs for indentation, and additional spaces to make the code "look pretty". Somebody please tell me why this is bad and I'll stop. class Apple(object):

Re: DOS, UNIX and tabs

2006-12-28 Thread Tom Plunket
Steven D'Aprano wrote: > I don't know what "problems" with tabs you are talking about. I never have > problems with tabs. *Other people* who choose to use software that doesn't > understand tabs have problems. > > I've spent a lot of time reading both sides of the tabs versus spaces > argument, a

Re: DOS, UNIX and tabs

2006-12-28 Thread Sebastian 'lunar' Wiesner
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> typed > In <[EMAIL PROTECTED]>, Felix Benner wrote: > >> I like using tabs. And the style guide doesn't give a reason why one >> shouldn't and neither does the thread >> http://www.python.org/search/hypermail/python-1994q2/0198.html in the >> archive.

Re: DOS, UNIX and tabs

2006-12-28 Thread Grant Edwards
On 2006-12-28, Felix Benner <[EMAIL PROTECTED]> wrote: > I like using tabs. And the style guide doesn't give a reason > why one shouldn't and neither does the thread > http://www.python.org/search/hypermail/python-1994q2/0198.html > in the archive. So what's the point in typing four spaces for > i

Re: DOS, UNIX and tabs

2006-12-28 Thread Grant Edwards
On 2006-12-28, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I've spent a lot of time reading both sides of the tabs versus spaces > argument, and I haven't found anything yet that explains why tabs are, in > and of themselves, bad. They aren't. Using tabs isn't bad. Using both tabs and spaces i

Re: DOS, UNIX and tabs

2006-12-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Felix Benner wrote: > I like using tabs. And the style guide doesn't give a reason why one > shouldn't and neither does the thread > http://www.python.org/search/hypermail/python-1994q2/0198.html in the > archive. > So what's the point in typing four spaces for indentation

Re: DOS, UNIX and tabs

2006-12-28 Thread Duncan Booth
Felix Benner <[EMAIL PROTECTED]> wrote: > So what's the point in typing four spaces for indentation instead of one > tab? So long as you always use only tabs there is no problem. So long as you only use spaces there is no problem. If you mix tabs and spaces you can introduce bugs. In particular

Re: DOS, UNIX and tabs

2006-12-28 Thread Christophe Cavalaria
Felix Benner wrote: > Christophe Cavalaria schrieb: >> Steven D'Aprano wrote: > >> You gave the reason in your post : because other people who are using >> software that doesn't understand tabs as YOU expect them to have problems >> with your code. >> >> Tabs aren't a problem at all as long as n

Re: DOS, UNIX and tabs

2006-12-28 Thread Felix Benner
Christophe Cavalaria schrieb: > Steven D'Aprano wrote: > You gave the reason in your post : because other people who are using > software that doesn't understand tabs as YOU expect them to have problems > with your code. > > Tabs aren't a problem at all as long as nobody else than you edit your c

Re: DOS, UNIX and tabs

2006-12-28 Thread Felix Benner
Sebastian 'lunar' Wiesner schrieb: > Ben <[EMAIL PROTECTED]> typed > >> I have a python script on a windows system that runs fine. Both use >> tabs to indent sections of the code. > > Just a tip for you: In python you never use tabs for indentation. The > python style guide [1] recommends four sp

Re: DOS, UNIX and tabs

2006-12-28 Thread Sebastian 'lunar' Wiesner
Steven D'Aprano <[EMAIL PROTECTED]> typed > On Thu, 28 Dec 2006 09:26:28 +0100, Sebastian 'lunar' Wiesner wrote: > >> It is, and especially the problems with tabs shows you, why it is >> good practice to follow the standard in your own code, too... > > I don't know what "problems" with tabs you

Re: DOS, UNIX and tabs

2006-12-28 Thread Christophe Cavalaria
Steven D'Aprano wrote: > On Thu, 28 Dec 2006 09:26:28 +0100, Sebastian 'lunar' Wiesner wrote: > >> It is, and especially the problems with tabs shows you, why it is good >> practice to follow the standard in your own code, too... > > I don't know what "problems" with tabs you are talking about.

Re: DOS, UNIX and tabs

2006-12-28 Thread Steven D'Aprano
On Thu, 28 Dec 2006 09:26:28 +0100, Sebastian 'lunar' Wiesner wrote: > It is, and especially the problems with tabs shows you, why it is good > practice to follow the standard in your own code, too... I don't know what "problems" with tabs you are talking about. I never have problems with tabs. *

Re: DOS, UNIX and tabs

2006-12-28 Thread Sebastian 'lunar' Wiesner
"Erik Johnson" <> typed > > "Ben Finney" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> "Sebastian 'lunar' Wiesner" <[EMAIL PROTECTED]> writes: >> >> > Just a tip for you: In python you never use tabs for indentation. >> >> For some value of "you". >> >> > The python style guid

Re: DOS, UNIX and tabs

2006-12-27 Thread Steven D'Aprano
On Wed, 27 Dec 2006 20:15:33 +0100, Sebastian 'lunar' Wiesner wrote: > Ben <[EMAIL PROTECTED]> typed > >> I have a python script on a windows system that runs fine. Both use >> tabs to indent sections of the code. > > Just a tip for you: In python you never use tabs for indentation. The > python

Re: DOS, UNIX and tabs

2006-12-27 Thread Erik Johnson
"Ben Finney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Sebastian 'lunar' Wiesner" <[EMAIL PROTECTED]> writes: > > > Just a tip for you: In python you never use tabs for indentation. > > For some value of "you". > > > The python style guide [1] recommends four spaces per indent

Re: DOS, UNIX and tabs

2006-12-27 Thread Gabriel Genellina
At Wednesday 27/12/2006 20:09, Ben Finney wrote: > The python style guide [1] recommends four spaces per indentation > level. > > [1] http://www.python.org/dev/peps/pep-0008/ It's not quite absolute on the topic: For new projects, spaces-only are strongly recommended over tabs. Of course

Re: DOS, UNIX and tabs

2006-12-27 Thread Roel Schroeven
Ben schreef: > I have a python script on a unix system that runs fine. I have a python > script on a windows system that runs fine. Both use tabs to indent > sections of the code. I now want to run them on the same system, > actually in the same script by combining bits and pieces. But whatever > I

Re: DOS, UNIX and tabs

2006-12-27 Thread Ben Finney
"Sebastian 'lunar' Wiesner" <[EMAIL PROTECTED]> writes: > Just a tip for you: In python you never use tabs for indentation. For some value of "you". > The python style guide [1] recommends four spaces per indentation > level. > > [1] http://www.python.org/dev/peps/pep-0008/ It's not quite absol

Re: DOS, UNIX and tabs

2006-12-27 Thread Sebastian 'lunar' Wiesner
Ben <[EMAIL PROTECTED]> typed > I have a python script on a windows system that runs fine. Both use > tabs to indent sections of the code. Just a tip for you: In python you never use tabs for indentation. The python style guide [1] recommends four spaces per indentation level. [1] http://www.pyt

Re: DOS, UNIX and tabs

2006-12-27 Thread Grant Edwards
On 2006-12-27, Ben <[EMAIL PROTECTED]> wrote: >>> I've found the unexpand command, which seems to do the trick. However, >>> it outputs to standard output, and I haven't worked out yet how to >>> capture that output to a file... >> >> unexpand file2 > Great - that worked.Thanks! > > Is that a gen

Re: DOS, UNIX and tabs

2006-12-27 Thread Ben
Great - that worked.Thanks! Is that a general method in linux you can always use to redirect standard output to a file? Cheers, Ben Grant Edwards wrote: > On 2006-12-27, Ben <[EMAIL PROTECTED]> wrote: > > I've found the unexpand command, which seems to do the trick. However, > > it outputs to s

Re: DOS, UNIX and tabs

2006-12-27 Thread Grant Edwards
On 2006-12-27, Ben <[EMAIL PROTECTED]> wrote: > I've found the unexpand command, which seems to do the trick. However, > it outputs to standard output, and I haven't worked out yet how to > capture that output to a file... unexpand file2 -- Grant Edwards grante Yow!

Re: DOS, UNIX and tabs

2006-12-27 Thread Ben
I've found the unexpand command, which seems to do the trick. However, it outputs to standard output, and I haven't worked out yet how to capture that output to a file... Ben Ben wrote: > Hi, > > I have a python script on a unix system that runs fine. I have a python > script on a windows system

DOS, UNIX and tabs

2006-12-27 Thread Ben
Hi, I have a python script on a unix system that runs fine. I have a python script on a windows system that runs fine. Both use tabs to indent sections of the code. I now want to run them on the same system, actually in the same script by combining bits and pieces. But whatever I try my windows ta

DOS, UNIX and tabs

2006-12-27 Thread Ben
Hi, I have a python script on a unix system that runs fine. I have a python script on a windows system that runs fine. Both use tabs to indent sections of the code. I now want to run them on the same system, actually in the same script by combining bits and pieces. But whatever I try my windows ta