Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- globalidspace = GLOBALIDSPACE()
- container = CONTAINER(
- globalidspace,
- "Tpytag",
- "global",
- "Python Tag Example",
- [],
- ["NAME Tpytag;","INCLUDE Tbase;"]
- )
- group = GROUP(
- globalidspace,
- "ID_TAGPROPERTIES",
- "global",
- "First Group",
- [],
- ["COLUMNS 1;","DEFAULT 1;"]
- )
- element = ELEMENT(
- globalidspace,
- "IN_EXCLUDE",
- "PYTAG_OBJECTS",
- "global",
- "Objects",
- ["ACCEPT { Obase; }"]
- )
- long = ELEMENT(
- globalidspace,
- "LONG",
- "PYTAG_MODE",
- "global",
- "Editing Mode",
- ["FIT_H;"]
- )
- id1 = ID(globalidspace, "PYTAG_MODE_DELETE", "global", "Delete")
- id2 = ID(globalidspace, "PYTAG_MODE_REMOVE", 1005, "Remove")
- id3 = ID(globalidspace, "PYTAG_MODE_APPEND", "global", "Append")
- id4 = ID(globalidspace, "PYTAG_MODE_SWITCH", "global", "Switch")
- cycle = CYCLE( (id1, id2, id3, id4) )
- long.AddArgument(cycle)
- for i in (group,):
- container.AddElement(i)
- for i in (element, long):
- group.AddElement(i)
- from os.path import join, split
- path = join(split(__file__)[0], container.GetIdentifier())
- fres = open( path+".res", "w" )
- fh = open( path+".h", "w" )
- fstr = open( path+".str", "w" )
- fres.write(container.Format_res())
- fh.write(container.Format_h())
- fstr.write(container.Format_str())
- fres.close()
- fh.close()
- fstr.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement