John Machin wrote:
On Jun 30, 11:45 am, bvdp <[EMAIL PROTECTED]> wrote:
John Machin wrote:
Good questions. Short answer ... probably 'cause I've not thought the
problem though completely :)
> You are updating with *everything* in the 'more' module, not just the
> functions. This includes s
On Jun 30, 11:45 am, bvdp <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
>
>
>
> Good questions. Short answer ... probably 'cause I've not thought the
> problem though completely :)
>
> > You are updating with *everything* in the 'more' module, not just the
> > functions. This includes such thi
John Machin wrote:
Good questions. Short answer ... probably 'cause I've not thought the
problem though completely :)
> You are updating with *everything* in the 'more' module, not just the
> functions. This includes such things as __name__, __doc__, __file__.
> Could have interesting side-e
On Jun 30, 9:52 am, bvdp <[EMAIL PROTECTED]> wrote:
> Terry Reedy wrote:
>
> >
>
>
>
> >
> > Do you mean something like this?
>
>
>
> > >>> math.__dict__.update(string.__dict__)
> > >>> dir(math)
> > ['Formatter', 'Template', '_TemplateMetaclass', '__builtins__',
>
>
>
> I think t
Terry Reedy wrote:
>
>
> Do you mean something like this?
> >>> math.__dict__.update(string.__dict__)
> >>> dir(math)
> ['Formatter', 'Template', '_TemplateMetaclass', '__builtins__',
I think this is working First off, 2 module files:
funcs.py
def func1():
print "I'm func1
Terry Reedy wrote:
bvdp wrote:
Is it possible to do this from a function: import a module and append
the defs in that module to an existing module/namesapce.
So, in my code I have something like:
# main code
import mods
def loadmore(n):
import_module(n, mods)
# end of main
this
bvdp wrote:
Is it possible to do this from a function: import a module and append
the defs in that module to an existing module/namesapce.
So, in my code I have something like:
# main code
import mods
def loadmore(n):
import_module(n, mods)
# end of main
this will permit the add
Le Sunday 29 June 2008 21:08:36 bvdp, vous avez écrit :
> Is it possible to do this from a function: import a module and append
> the defs in that module to an existing module/namesapce.
>
> So, in my code I have something like:
>
> # main code
> import mods
>
> def loadmore(n):
> import_module
Is it possible to do this from a function: import a module and append
the defs in that module to an existing module/namesapce.
So, in my code I have something like:
# main code
import mods
def loadmore(n):
import_module(n, mods)
# end of main
this will permit the addition of the th