Non-Indented python

Michael Kelly mkelly2002 at earthlink.net
Tue Nov 20 22:59:59 EST 2001


On Thu, 15 Nov 2001 03:38:59 GMT, modman <modman at altavista.com> wrote:

>apparently this script relys on the programer of the other language to 
>write good readable code so that it looks a bit like python indentation 
>in the first place.

I've been checking out Python and already there are many things
I like about it, but I'm starting to get paranoid about indentation
issues with code pasted out of other scripts.  Seems when the
parser takes it into its head that "expecting indented block
at line #" when it sure as hell looks indented, it gets into a
thing where there's no way other than retyping lots of stuff
and praying to get it to parse the code.

Is there a utility to "clean" foreign scripts so that tabs/spaces
issues and other stuff invisible to the programmer can be
weeded out?  I mean, it would save a lot of time if I could
stick some Begin .. Ends or {} delimiters in the script and
move on to what I'm trying to do or at lease mark a block
and "clean" it so I'd know there'd be and end point to
messing with lines that have no apparent syntactic
errors(and are aligned, at least to the naked eye.)

I guess I'm bumming out 'cause there's so many things
I like about Python, esp how easy it is to use home grown
ActiveX .ocx with events and stuff, that I'm thinking there's
gotta' be a "gotcha" and so far indentation looks like it
in this case. :)

What do you guys use esp. when cutting and pasting
snippets from other files etc.??


Mike

--

"I don't want to belong to any club that would have me as a member."
    -- Groucho Marx



More information about the Python-list mailing list