[Pythonmac-SIG] MacPython - why doesn't it support .py files from Windows?

Russell E Owen owen@astro.washington.edu
Fri, 28 Sep 2001 10:55:15 -0600


Line endings are a hot topic. Right now Python is picky -- Python for a given platform will only read text files (incl code) with the correct line endings for that platform.

There are various ways to convert.

Simply transferring files via ftp (as text files, not binary!) or archiving them as StuffIt or Zip and unarchiving them on the Mac will fix line endings. StuffIt Expander is a free program that will unpack nearly any kind of archive; by default (I believe) it fixes line endings on text files; it's certainly a setting you can change.

BBEdit can write files using Mac, unix or Windows line endings. To convert a few files, simply open them, change the platform to Mac (one of the pop-up menus on the window's tool bar) and save.

There are also mass conversion utilities including "Change Type and Creator" (despite the name).

-- Russell