[Pythonmac-SIG] help for a MacPython begginer

John W Baxter jwblist@olympus.net
Tue, 17 Oct 2000 22:44:00 -0700


At 17:34 -0400 10/17/00, Jhst463@aol.com wrote:
>    Is it safe to make full use of the Mac's superior file system
>inside       
>        Python?(scripts & modules w/ 31 chars?
Yes, if...

And by the way, 31 characters is hardly "superior" for file name
limits...it was shockingly short back in the mid 1980s when HFS came out
[in the prior file system, the published file name limit was 128 and the
actual limit was 253 (but only on a volume with a one-character name)].

, 8-Bit characters(both for
>file names & inside the code itself?))

Yes for file names, if....

No for identifiers (hmmm, I take that back...it does seem to work, which I
think is a bug, since the language spec is rather clear on what an
identifier can have in it).  This seems to get an "if..." as well (along
with "and if the seeming bug is never fixed").

Identifiers (also referred to as names) are described by the following
lexical definitions:

identifier:     (letter|"_") (letter|digit|"_")*
letter:         lowercase | uppercase
lowercase:      "a"..."z"
uppercase:      "A"..."Z"
digit:          "0"..."9"

Identifiers are unlimited in length. Case is significant.



The "if..." stuff above fills out to "if you never will move the code to
other platforms".  Ever.  (And I make no guarantees about the effect of
putting an ASCII NUL (hex 00) character into a file name...there could be a
C-style string in the code somewhere.  But you wouldn't do that anyhow,
would you.)

  --John
-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA