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 +1 800 494 3119

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 holy grail.

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, but

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 much space.

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 post by

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 tools to

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 long 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 to line up

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 long as

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 single

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 this is bad

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 pretty. Somebody

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-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-list

Re: DOS, UNIX and tabs

2006-12-28 Thread Sebastian 'lunar' Wiesner
Erik Johnson ej at somewhere.com 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 guide [1]

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 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. I never

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 are talking

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 spaces per

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 code.

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 nobody else

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 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 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 is

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

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. This is a

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, and I

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

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

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

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 file1 file2 -- Grant Edwards grante

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

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 file1 file2 Great - that worked.Thanks! Is that a general method

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]

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 absolute on the

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 try

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 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 indentation level.

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 style