<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Good Day to All,<br><br>I'd like to engage the heavy weight gurus out there,<br>but anyone is welcome to respond,..<br>(Apologies for the long-winded email, but difficult<br>to accurate explain)<br><br>Though not new to software development, I'm still a bit<br>of a green horn in PyQt, and in my usual habit of running <br>before I learn to walk, I've began to code the fun things<br>and glossed over a few foundation basics, one of which<br>is modules and namespaces.  I'm used to using these constructs<br>from other languages and applications, and I had gleaned<br>how to use these, albeit at a novice level.  But now, I've<br>got a need where I need to do something kinda' fancy, but<br>not covered in any of the books I have, nor after web searching,<br>so here is the dilemma...<br><br>I had created 3 separate PyQt apps, each having the same
 <br>development path...<br><br><div style="margin-left: 40px;">from Designer ----> AAA.ui<br></div><div style="margin-left: 40px;">from pyuic.py ----> ui_AAA.py<br></div><br>then in my main program, I do the import<br><br><div style="margin-left: 40px;">import ui_AAA.py as AAX<br></div><br>then write the rest,etc....<br><br><br>So, I was tasked to string these 3 apps togther into a <br>continuing sequence,..so I looking at QWizard, and I've<br>been successful at coding a very small, bare-bones PyQt<br>program that puts in of the three UIs into the 1,2,3 nature<br>of the wizard.  Near the top of this program are<br><br><div style="margin-left: 40px;">import ui_AAA.py as AAX<br></div><div style="margin-left: 40px;">import ui_BBB.py as BBX<br></div><div style="margin-left: 40px;">import ui_CCC.py as CCX<br></div><br>My Main Function looks like this:<br><br><div style="margin-left: 40px;">class MainWizard(QtGui.QWizard):<br></div><div
 style="margin-left: 80px;">def __init__(self, parent=None):<br></div><div style="margin-left: 120px;">QtGui.QWizard.__init__(self, parent)<br></div><div style="margin-left: 120px;">self.topWObject = parent<br></div><div style="margin-left: 120px;">self.setWizardStyle(1)<br></div><div style="margin-left: 120px;">self.setGeometry(400, 200, 650, 750)<br></div><br><div style="margin-left: 120px;">self.setPage(0,Step1_CreateAsset_Dialog(self))<br></div><div style="margin-left: 120px;">self.setPage(1,Step2_UpdateData_dialog(self))<br></div><div style="margin-left: 120px;">self.setPage(2,Step3_Publish_dialog(self))<br></div><br>and the "Step 1" (Page0) functions is as follow:<br><br><div style="margin-left: 40px;">class Step1_CreateAsset_Dialog(QtGui.QWizardPage,Wizard_CreateAsset):<br></div><div style="margin-left: 80px;">def __init__(self, parent=None):<br></div><div style="margin-left: 120px;">QtGui.QWizardPage.__init__(self,parent)<br></div><div
 style="margin-left: 120px;">Wizard_CreateAsset.__init__(self)<br></div><div style="margin-left: 120px;">self.setupUi(self)<br></div><br>and the other functions for steps 2 & 3 (Page1 & Page2) are essentially<br>identical...This all works,...and I am much relieved ;-) <br>But here's my problem...<br><br>Each of these underlying 3 apps, have their own "main" function,<br>which I can copy&paste in easy enough,...but also each of them<br>have kinda' long supporting functions.  After a test, I found<br>I could "brute force" it, and copy&paste the entire program<br>into (and under) the stepX function above,...but rather than<br>do that,...isn't there a way, where I can do another "import"<br>statement and *link* the old-way program into the new-way (wizard) one?<br><br>From other work,...I know that I could do<br><br>    import main_AAA.py as AAA_Main<br><br>and in subsequent statements,...use the namespace
 like<br><br>    self.whatever(AAA_Main.whatever())<br><br>etc,etc...which works in the initial "class" definition function,<br>but I can't find the right syntax or something to pull in all the<br>other functions.<br><br>I copied <br>    main_AAA.py <br>to <br>    stripped_main_AAA.py<br><br>and stripped out everything except the functions,...and tried to<br>import it back into the wizard main as:<br><br>    import stripped_main_AAA.py as AAA_stm<br><br>but calling the functions inside "stripped_main_AAA.py" using<br>the nameSpace prefix "AAA_stm" doesn't work...the first thing<br>it complains about are graphic elements.<br><br>in stripped_main_AAA.py, there's<br><br>    self.WarningLabel<br><br>but addressing that element back in the Wizard proram as<br><br>    AAA_stm.WarningLabel<br>or<br>    AAA.WarningLabel<br><br>neither works....<br><br><br>So,
 strategically thinking,...what's the best way to achieve this kind <br>of program/module sharing/linking?<br><br>Any thoughts, suggestions, advice, or words of wisdom, is mostly greatly<br>appreciated,<br>Thank you,<br>-James<br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br></td></tr></table><br>