On Wed, Jan 19, 2005 at 07:06:49PM -0500, Frank D. Engel, Jr. wrote: > Uh, does the Python doc specify "platform" line endings, or "normal > (\n)" line endings? It sounded to me like it always wanted the > UNIX-style \n line endings, so that using those would result in > portability... That's the problem, Python specifies "platform" line endings. See this note: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66434 > When working between platforms, it is often necessary to convert the > line endings on files for them to work, especially when it comes to > code. Pass Unix Python code with \r and it goes nowhere. Same on Mac > Python with \n. This code simply and easily fixes the problem. Note, one of these links provides a possible solution: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59867 > This code eliminates the need to convert line endings when moving .py > modules between OSes. Put in your sitecustomize.py, anywhere on > sys.path, and you'll be able to import Python modules with any of > Unix, Mac, or Windows line endings, on any OS. I don't understand how it works, but people claim it solves their problem... Hope this helps, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment:
pgpby8IKMUUPT.pgp
Description: PGP signature