Re: Tutorial suggestions

Steven D. Majewski (sdm7g@virginia.edu)
Thu, 29 Sep 1994 11:35:59 -0400 (EDT)

A while back, after reading a Byte article on Perl ( It was either
by TC or LW, I forgot. ) which used some Perl variations on unix
'find' as an example, I wrote and posted a similar Python program.

I thought that was a good example: it used sys and os and I tried
to use portable things like os.path.join/split that didn't assume
posix like pathnames, etc. Plus I thought that portability and
a couple of other features made a good example to hold up next
to the published Perl version.

It's *NOT* very (at all?) object-oriented - but maybe you shouldn't
try to pack everything into one example!

I had planned to (someday!) get around to writing a tutorial
commentary to go along with the example, but I had forgotten
about it until this thread. If there is some interest, I'll
dig it out again. Maybe someone can volunteer to actually
test the portability and run it on Mac or DOS for me ?

A Python portability guide would be another nice addition:
When I wrote that, I recall asking about what functions
can be depended on to be in os, what the possible literal
values for os.name are, etc. and getting some answers from
Guido and others.

Have the folks who ported Python to NT or OS/2 for example,
paid attention to these details ? I wouldn't blame them if
they didn't - I don't think they are prominently mentioned
in a porting guide or anything.

What string is returned by os.name on NT ? ( 'nt', 'NT', 'win32' ? )
Does the dos windows version return 'win' or something
to distinguish it from the vanilla dos port ?

We need to know these exactly and case sensitively, 'cause
people like me use them in tests and they may be needed
in naming other conditionally imported modules.

-- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU> --
-- UVA Department of Molecular Physiology and Biological Physics --
-- Box 449 Health Science Center Charlottesville,VA 22908 --
[ "Cheese is more macho?" ]