[Tutor] Re: Re: Env Vars

Derrick 'dman' Hudson dman@dman.ddts.net
Wed, 3 Jul 2002 21:23:18 -0500


--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 03, 2002 at 09:47:07PM -0400, Kyle Babich wrote:
| Yes, I have been reading.

Ok, good :-).

| OE must be screwing up

Why doesn't that surprise me in the least?=20

| indentations because I
| even tried copying any pasting and it didn't work.

FWIW, Lloyd did have tab characters in the code he posted.  My vim
settings (which I use as a pager in mutt) shows them quite clearly.

| Indentations I've almost figured out, my only problem is when to do
| I do 4 and when do I do a tab which this tutorial told me:
| http://blacksun.box.sk/tutorials/python.htm

I skimmed that tutorial (rather I did a search for 'tab' in it) and
only saw one brief comment.

A better discussion of spaces and tabs in python comes from Guido :

http://python.org/doc/essays/styleguide.html


The key to indentation in python is consistency (and remembering that
a tab is an 8-space indent).  For example, with vim you can use this
snippet of a .vimrc to set up your indentation handling :

    augroup Python
        au!
        au FileType python set sts=3D4 sw=3D4 et tw=3D78 fo=3Dcroq2 hls

        " override C preprocessor indenting
        au FileType python inoremap # X<C-H>#
    augroup END

(use :help in vim to see what those options mean, I like the short
names for my own usage)

I (and apparently Guido) like a 4-space indentation level and always
uses spaces (not tabs).  Python just needs the indentation to be
consistent, however deep you want to make it.  Whether you use a space
or a tab is irrelevant to the interpreter, except for the one point
that a tab is considered an 8-space indentation level.  (some editors
allow you to change the width it displays for a tab, and to have it
mix tabs and spaces, and that will bite you hard)

| Anyway, after you mentioned indentations I got it on my first try.

Good!

Keep working on it!  :-)

HAND,
-D

PS.  the .sig is randomly chosen from a list (python script)

--=20

[Perl] combines all the worst aspects of C and Lisp: a billion different
    sublanguages in one monolithic executable.
It combines the power of C with the readability of PostScript.
        -- Jamie Zawinski
=20
http://dman.ddts.net/~dman/


--vkogqOf2sHV7VnPd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj0jsZYACgkQO8l8XBKTpRTPYwCeIAtCTUNZXhiP79zrMeoJuBvI
5f8AnAnxt3+lSL3EjEnnM+0Gvg3eDIAq
=HlE0
-----END PGP SIGNATURE-----

--vkogqOf2sHV7VnPd--