def register_old_sf_par(self): curdir = os.path.abspath(os.path.curdir) #curdir = '' par_conn_str = "MGA=" + curdir + "used_paradigms\\SF\\SF_older.mta" par_con2_str = "XML=" + curdir + "used_paradigms\\SF\\SF_older.xmp" ori_conn_str = "MGA=" + curdir + "used_paradigms\\SF\\SF_orig.mta" registrar = DispatchEx("Mga.MgaRegistrar") # 1: user registry # 2: system registry register_in = 1 newname = registrar.RegisterParadigmFromData(par_conn_str, None, register_in) # maybe we have to register the original sf.mta file once again newname = registrar.RegisterParadigmFromData(ori_conn_str, None, register_in) # {5D6FF99D-D6C2-46A5-9208-CCA15D5FA16C} guid of the SF_older.xmp # char_guid = [ '0x9d', '0xf9', '0x6f', '0x5d', '0xc2', '0xd6', '0xa5', '0x46', '0x92', '0x08', '0xcc', '0xa1', '0x5d', '0x5f', '0xa1', '0x6c' ] bin_guid = [ 0x9d, 0xf9, 0x6f, 0x5d, 0xc2, 0xd6, 0xa5, 0x46, 0x92, 0x08, 0xcc, 0xa1, 0x5d, 0x5f, 0xa1, 0x6c ] #return char_guid return bin_guid
def _regxmp(xmpfile, regaccess): REG_USER = 1 REG_SYSTEM = 2 REG_BOTH = 3 registrar = DispatchEx("Mga.MgaRegistrar") if os.path.splitext(xmpfile)[1].lower() == ".xmp": registrar.RegisterParadigmFromData("XML=" + os.path.abspath(xmpfile), "", regaccess) else: registrar.RegisterParadigmFromData("MGA=" + os.path.abspath(xmpfile), "", regaccess)
def setUp(self): registrar = DispatchEx("Mga.MgaRegistrar") registrar.RegisterParadigmFromData( "XML=" + _adjacent_file("BidirConnection.xmp"), "BidirConnection", 1)