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
diff --git a/Lib/xmlWriter.py b/Lib/xmlWriter.py
index b078959..499341f 100644
--- a/Lib/xmlWriter.py
+++ b/Lib/xmlWriter.py
@@ -5,6 +5,7 @@
 
 import string
 import struct
+import os
 
 INDENT = "  "
 
@@ -13,6 +14,9 @@
 	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