[Python-Dev] Free threading (and tcl upvar)
Ken Manheimer
klm@zope.com
Thu, 9 Aug 2001 11:15:03 -0400 (EDT)
On Thu, 9 Aug 2001, Tim Peters wrote:
> 2. Tcl's more robust (than Python's) x-platform exec implementation
> (similar to Python os.system(), but with a platform-independent
> notation for pipes and redirection and envar substitution, and
> returning the exit status correctly even under command.com-based
> Windows flavors (where os.system() always returns 0)). I looked
> at this once -- there are several thousand lines of exec support
> code in Tcl (which shouldn't be surprising, since they're basically
> supplying one of the hardest parts of a x-platform shell!).
I recall you reporting that. It *would* be nice to have cross-platform
pipes and exec, though i understand maintaining such non-portable code is
too high a price to pay. I bet we went over this then, but i can't help
but wonder whether an approach like tkinter, stealing the tcl code, would
be a manageable approach? Mostly idle speculation, since i wouldn't have
the time nor expertise to implement such a thing myself.
> 3. Variants of Tcl's uplevel, i.e. gimmicks for fiddling locals
> "up the stack". Maybe it's not called exactly "uplevel" in Tcl,
> but it's plain sick however it's spelled <wink>.
I think it's 'upvar'. I probably remember because it had something to do
with my python roots. Pardon me while i geeze a bit...
Back at nist i was looking for a scripting language for systems support
type stuff, bounced off perl, and tried using tcl for a trial task, to see
if i could use it. I made a dns nested-domain traverser, so i could
automate a table-driven network service for all of nist's subdomains
(producing an exports file for a nist-wide NFS service).
I did it, but was not a happy camper - it was seriously painful to have to
manage recursion by, essentially, managing the stack with upvar, &c.
Mike mclay happened to drop by around then, and i whined to him about my
tcl abomination um script - and he said, "have you looked at python?" I
did, and, to make a long story short, lived happily ever after.-)
'upvar' *is* sick.
Thanks, mike.
Ken
klm@zope.com
[In a usenet news group, long long ago:]
> [Someone]:
>
> >Programming language preferences are largely a matter of taste, an area
> >where reasonable people will forever disagree. I would like to think
> >that such disagreements could be predicated upon an understanding that
> >most of the issues involved are not decidable by logical proofs.
>
> This is the 101 philosophy-student phenomena: "I can't explain it with
> words".
>
> - marcus@ee.pdx.edu (Marcus Daniels)