set XML file type to BBEdit when on MacOS

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@47 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2000-01-04 13:51:59 +00:00
parent d0beb0eb84
commit e414c92045

View File

@ -5,6 +5,7 @@ __version__ = "0.9"
import string
import struct
import os
INDENT = " "
@ -13,6 +14,9 @@ class XMLWriter:
def __init__(self, file, dtd=None, indentwhite=INDENT):
if type(file) == type(""):
self.file = open(file, "w")
if os.name == "mac":
import macfs
macfs.FSSpec(file).SetCreatorType('R*ch', 'TEXT')
else:
# assume writable file object
self.file = file