[Tutor] Pyhon Mac/Pc

Kent Johnson kent37 at tds.net
Sun Jan 13 16:57:11 CET 2008


Hendrik Verlinden wrote:
> Is the programming language for windows and mac the same?

The language is the same. There are some differences between the 
platforms. Well-written Python programs can be portable across platforms.

One difference between platforms is the default line ending. Windows 
uses carriage return / line feed (two characters). Linux and Mac OS X 
use just line feed; Mac OS 9 and earlier use carriage return.

> I use a python 
> script in Blender (3d program) to export it as a DOF-format.

What is 'it' (that is being exported)? What is DOF format?

> I get a 
> dof-file but I can't do anything with it. When I use a dof-file from 
> windows (made the same way) it works. Perhaps I have to change some 
> characters in the python document.

The details aren't too clear here. It sounds like you
- export a file from Blender on a non-windows computer
- copy the file to windows
- it doesn't work

but
- export a file from Blender on a windows computer
- use the file to windows
- it works

Is that right? If so, my guess is that the DOF files are not portable. 
You may have to tranlate the line endings from what is used on the 
source platform to the CRLF used on Windows, or change the non-Windows 
program to output CRLF.

Hmm. A little googling comes up with this:
http://relro.net/racer/dofexport.html

Is that what you are using?

Kent


More information about the Tutor mailing list