diff options
Diffstat (limited to 'editor/icons')
-rw-r--r-- | editor/icons/SCsub | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 564188f315..07fe45ce11 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -1,18 +1,17 @@ #!/usr/bin/env python Import('env') - +from compat import StringIO def make_editor_icons_action(target, source, env): import os - import cStringIO dst = target[0].srcnode().abspath svg_icons = source - whites = cStringIO.StringIO() - darks = cStringIO.StringIO() + whites = StringIO() + darks = StringIO() for f in svg_icons: @@ -48,7 +47,7 @@ def make_editor_icons_action(target, source, env): whites.write('\n') darks.write('\n') - s = cStringIO.StringIO() + s = StringIO() s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") s.write("#ifndef _EDITOR_ICONS_H\n") s.write("#define _EDITOR_ICONS_H\n") @@ -75,7 +74,7 @@ def make_editor_icons_action(target, source, env): s.write("#endif\n") - f = open(dst, "wb") + f = open(dst, "w") f.write(s.getvalue()) f.close() s.close() @@ -88,5 +87,4 @@ make_editor_icons_builder = Builder(action=make_editor_icons_action, env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', Glob("*.svg"))]) -env.editor_sources.append("#editor/editor_icons.gen.h") Export('env') |