"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Andy Salnikov wrote: >> "Michael Tobis" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> >>>When you say "all kinds" of inlined code, do you have any other >>>examples besides HTML? >>> >> >> Makefiles is one example. Shell script containing snippet(s) of >> Python code is another one. >> >> At one time I also tried to make a simple "configuration file" >> engine based on Python for a big Framework used in one physics lab. >> Idea was to have a Python extension for that C++ framework and >> to configure the Framework from Python code, like: >> >> # Module means C++ Framework module, not Python >> >> Module1.param1 = "a string" >> Module2.paramX = [ 1, 2, 3 ] >> # etc., with all Python niceties. >> >> People who were using this Framework were all hard-core physicists, >> some of them knew Fortran, many were exposed to C++. There were >> few other "languages", some of them home-grown, used for different >> tasks, but none of these mentioned languages ever placed so much >> significance on the whitespaces. There were some big surprises for >> people when they discovered they can't arbitrary indent pieces of >> the above configuration files because it is all Python code. Add >> here space/tabs controversy if it is not enough yet to confuse >> poor physicist fellows :) I think that config file project was killed >> later in favor of less restrictive format (I left the lab before that, >> can't say for sure.) >> > I just hope this remains a "someone made a poor choice of configuration > language and trained the users inadequately" story, and does not > transmogrify into a "Python is bad" story. > It does not, and I did not say it's "bad". But people do percieve it as at least very weird kind of language in a modern times of all the "curly brace languages".
> You mention makefiles and shell scripts as contexts unsympathetic to > Python's indentation requirements, but frankly you don't see much code in > any language except shell inlined in these contexts. > Shell's strength is in the process spawning/management and input/output redirection, Python is rather weak in that area but OTOH Python is strong in processing highly structured and numeric data, where shells are really weak. I saw lots of awk or sed "code" embedded in scripts so your claim that nothing except sheel is being inlined does not look right to me. > Given the makefile's requirement that significant leading whitespace be > tabs and not spaces and you have a recipe for disaster inlining any > language. > I saw makefiles with thousands lines of Perl code in them. I agree this (Perl) is disaster, but it would probably be better if it was Python code instead. Andy. -- http://mail.python.org/mailman/listinfo/python-list