I'm trying to decipher how to have a postgui hal file with my custom GUI. The following snippet I assume does the magic of loading the postgui file. Some I understand and some I don't.
if __name__ == "__main__": if len(sys.argv) > 2 and sys.argv[1] == '-ini': print "ini", sys.argv[2] hwg = touchy(sys.argv[2]) else: hwg = touchy() res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-f", "touchy.hal"]) if res: raise SystemExit, res # load a postgui file if one is present in the INI file postgui_halfile,inifile = touchy.postgui(hwg) print "TOUCHY postgui filename:",postgui_halfile if postgui_halfile: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i",inifile,"-f", postgui_halfile]) if res: raise SystemExit, res gtk.main() The line hwg = touchy(sys.argv[2]) what is that doing? Also what is postgui_halfile,inifile = touchy.postgui(hwg) doing? Somehow it seems that postgui_halfile is being set to > 0 if one is found in the ini file but I don't understand how that line does that? Thanks John ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users