from test2 import fn, C if doQtTest: print("Button test before:") btn.sig.connect(fn) btn.sig.connect(a1.fn) btn.emit() #btn.sig.emit() print("") #print "a1.fn referrers:", sys.getrefcount(a1.fn.im_func), gc.get_referrers(a1.fn.im_func) print("Test2 before reload:") fn() oldfn = fn test2.a1.fn() test2.b1.fn() c1 = test2.C('c1') c1.fn() os.remove(modFile1+'c') open(modFile1, 'w').write(modCode1%(2,2)) print("\n----RELOAD test1-----\n") reloadAll(os.path.abspath(__file__)[:10], debug=True) print("Subclass test:") c2 = test2.C('c2') c2.fn()
from test2 import fn, C if doQtTest: print("Button test before:") btn.sig.connect(fn) btn.sig.connect(a1.fn) btn.emit() #btn.sig.emit() print("") #print "a1.fn referrers:", sys.getrefcount(a1.fn.im_func), gc.get_referrers(a1.fn.im_func) print("Test2 before reload:") fn() oldfn = fn test2.a1.fn() test2.b1.fn() c1 = test2.C('c1') c1.fn() os.remove(modFile1 + 'c') open(modFile1, 'w').write(modCode1 % (2, 2)) print("\n----RELOAD test1-----\n") reloadAll(os.path.abspath(__file__)[:10], debug=True) print("Subclass test:") c2 = test2.C('c2') c2.fn()
from test2 import fn A = 90 print('rajeev') print(fn())