From e414c92045cee859cd5bd76610c5819c5ec8c68b Mon Sep 17 00:00:00 2001 From: Just Date: Tue, 4 Jan 2000 13:51:59 +0000 Subject: [PATCH] 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 --- Lib/xmlWriter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/xmlWriter.py b/Lib/xmlWriter.py index b078959ca..499341fbf 100644 --- a/Lib/xmlWriter.py +++ b/Lib/xmlWriter.py @@ -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