looking for way to include many times some .py code from anotherpython code

Scott David Daniels Scott.Daniels at Acm.Org
Tue Mar 8 07:51:13 EST 2005


Martin MOKREJŠ wrote:
> Hi,
>  I'm looking for some easy way to do something like include in c or PHP.
> Imagine I would like to have:   ....
> 
>  I know about module imports and reloads, but am not sure if this is the 
> right way to go. Mainly, I want to assign to multiple object instances 
> some self bound variables. Their values will be different, so I can't 
 > use global variables.

Someone will, no doubt, find a way to code this.  I suggest you are
fighting the language here -- learn to use it instead.  Decide what
you really want to do, not how you want to do it.  Then try to figure
out how to accomplish your real goal in the normal flow of the language.


-Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list