In your particular situation, I've often used the "One Library, two
executable" pattern.

Put all the common functionality into one python module. Have one
python file who's main brings up a GUI and one who brings up the admin
cli interface, both of which that import the main library that does
all the common things.

            --Michael

On 9/27/07, shawn bright <[EMAIL PROTECTED]> wrote:
> It's the second one, not all the modules will be available on the portable
> version. But the threads that require those modules will not be necessary on
> the portable version. I want to be able to go to any linux computer with GTK
> and mysqldb installed and check out my stuff from svn and run the admin part
> of the program. But the main computer at work that takes data in will need
> the modules to run the threads.
>
> thanks for your help on this
>
> shawn
>
>
> On 9/26/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> > shawn bright wrote:
> > > lo there all,
> > >
> > > i have a gui program that imports a few modules that i don't need if i
> > > am using the program remotely.
> > > The program has an admin interface and thread interface, only the admin
> > > interface is needed when
> > > i am using the program from a remote computer.
> > >
> > > all of my modules are imported at the start of the file, and not
> > > initiated till a certain button is clicked on the GUI, could i put those
> > > import statements in the button click event?
> >
> > Yes but why do you want to? The reasons I know for doing this:
> > - the import takes a long time or a lot of memory and you don't want to
> > incur the cost unless you need it
> > - the imported module may not be available always and you want the rest
> > of the importing module still to be usable
> >
> > Kent
> >
>
>
> _______________________________________________
> Tutor maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Michael Langford
Phone: 404-386-0495
Consulting: http://www.TierOneDesign.com/
Entertaining: http://www.ThisIsYourCruiseDirectorSpeaking.com
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to