[Edu-sig] Python for non-programmers
Wed, 01 Mar 2000 20:50:44 -0800
>The script itself is being parsed directly by Python and
>any syntactical error will generate a standard Python
As soon as you say "parsed directly by Python" it sounds like
you're writing in another language.
I mean, we _could_ say that Python is a clever way of squeezing
a lot of utility out of ANSI C, given that's what it's written
in (not C++, as I mistakenly claimed in an earlier post).
But then C is a clever way of sqeezing utility out of
assembler or machine language. Ultimately, we're all in the
business of controlling chips (which control us back -- a
feedback loop, via what I call the "cell-silicon" interface
(keyboards, monitors and like that)).
Seriously though, your scripting language doesn't look all
that Python-like to my eyes. Every statement is an assignment
(in the example given anyway). No indents, no key words
I recognize as Python's, right off the bat.
>There is a good deal of html documentation done and in the download.
OK, that's encouraging. My habit is to read documentation
first, to get a flavor of what's involved, _before_ I do
any installation of a runtime setup. I want to know what
I'm getting in to. Given my habits, I of course find it
most convenient if the documentation isn't bundled with all
the rest of it.
Like, before I got around to downloading the Java SDK for
the first time, I poked around at the Sun website and looked
at the tutorials and examples. I decided Java looked learnable
on that basis. But other websites I've poked around in have
prompted a different response: learning curve too steep,
too much to learn right now, no gradual on-ramp available
(or no affordable price tag -- not Python's problem).
I think a lot of us go through a similar assessment process:
we try to figure out if this is something we can master
_in principle_, based on what learning materials we see
are already out there. Given all the hard work going into
making Java intelligible, even to beginners, I was encouraged
to start learning it. Same with Python.
Actually, I'm pretty sure it was positive remarks by
Bruce Eckel (recent poster), in one of his newsletters,
that finally prompted me to take a serious look at
Python. I'd read Bruce's 'Thinking in Java' and found
it to be an exceedingly clear presentation (as have many
others). "If Bruce likes thinking in Python, I bet I
would too," is what I was probably thinking (before
that, I had only the haziest of ideas about Python --
sounded way more arcane than it is).
> That's all thats going on . And OpenGL draws it. Nothing up the sleeve.
That's interesting. As a student myself, what I'd be looking
for is a tutorial on how to make Python talk to OpenGL. I know
you have an add-on module for that. I'm not clear what resources
are already out there. Probably you had to learn this stuff
from the work of others. So if you had a website with a lot
of on-line documentation, you'd have a pointer to the OpenGL
piece and say "for more background on this topic, click here"
or something like that.
That's what I love about the web: you can send your readers
to where they need to go in order to continue with your thread
(after some detours, however long), if that's their true intent
(some follow your tangents and never return -- such is life).
So much more convenient than sitting in a library, where such
"see such-and-such" directives mean getting out of my seat,
taking the elevator, checking the card catalog, taking the
elevator again -- and finding the book missing from the shelf.
I used to dream we'd have hypertext someday. Now we do. Yay.
I guess what's confusing me about your syntax, right off the
bat, is every statement seems to be an assignment. You're
returning objects and then using these objects as parameters
fed to other objects. I find myself thinking: "What if
I just want to define an object but not have it draw anywhere?"
Like, I'm not used to having "assignment" (tri = Triangle(a,b,...))
so directly associated with the verb "to draw". In other
words, what seems alien about your syntax is I don't see
tri = Triange(a,b,..) # returning object, initialize w/ params
tri.color = "Blue" # setting a property (needn't be a param)
tri.draw() # invoking a method
To have an "=" statement actually "do" something (other than
assign an object's handle to a variable) seems kinda quirky
to me -- as a general proposition, nothing to do with Python
per se. Is 'learning to think in PyGeo' going to help me
learn to think in Python? Is the style the same? I don't
know yet. Just curious.
>Yes. On the other hand, I see a lot of similarities in our approach to
Indeed. The focus on geometry for starters.
>I am an old dog learning new tricks.
Ditto. We old dogs aren't so stupid as the old saying suggests.
>I don't participate in the discussions about whether Python is the
>best language with which to teach OOP, because I take that as a
>given. And I base that on my own experience. Whatever I understand
>about OOP I learned from Python - and that after a few false
>starts with other approaches.
I agree that this is something of a premise from the standpoint
of this SIG. We're here because we're committed to seeing
Python used as a teaching language (not to the exclusion of
all others, but used nevertheless). The debates rage on, but
"which language?" is not really a relevant thread in this
>Nonetheless, I could say a lot to defend PyGeo as relevant
>to CP4E - but will spare the EDU-SIG, at least for now.
I don't think you need to defend the relevance of your program
-- at least in my eyes it's highly relevant. I take that
as a given.