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:
parent
d0beb0eb84
commit
e414c92045
@ -5,6 +5,7 @@ __version__ = "0.9"
|
|||||||
|
|
||||||
import string
|
import string
|
||||||
import struct
|
import struct
|
||||||
|
import os
|
||||||
|
|
||||||
INDENT = " "
|
INDENT = " "
|
||||||
|
|
||||||
@ -13,6 +14,9 @@ class XMLWriter:
|
|||||||
def __init__(self, file, dtd=None, indentwhite=INDENT):
|
def __init__(self, file, dtd=None, indentwhite=INDENT):
|
||||||
if type(file) == type(""):
|
if type(file) == type(""):
|
||||||
self.file = open(file, "w")
|
self.file = open(file, "w")
|
||||||
|
if os.name == "mac":
|
||||||
|
import macfs
|
||||||
|
macfs.FSSpec(file).SetCreatorType('R*ch', 'TEXT')
|
||||||
else:
|
else:
|
||||||
# assume writable file object
|
# assume writable file object
|
||||||
self.file = file
|
self.file = file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user