Re: module name available in 'from ... import ...' statement

2007-04-30 Thread kwatch
Thanks Carsten and Gabriel, the answer is 'sys.modules'. import sys, os from path import sep# ImportError: No module named path sys.modules['path'] = os.path from path import sep# (no error) --

Re: [Q] module name available in 'from ... import ...' statement

2007-04-30 Thread Gabriel Genellina
En Mon, 30 Apr 2007 20:19:54 -0300, kwatch <[EMAIL PROTECTED]> escribió: > Could you teach me the condition of module name which is available > in 'from ... import ...' statement? > > The goal what I want to do is to create a module by 'new' module > and specify that module name in 'from ...' stat

Re: [Q] module name available in 'from ... import ...' statement

2007-04-30 Thread Carsten Haese
On Mon, 2007-04-30 at 16:19 -0700, kwatch wrote: > [...] > The goal what I want to do is to create a module by 'new' module > and specify that module name in 'from ...' statement. > > > # create a module > import new > foo = new.module('foo'

[Q] module name available in 'from ... import ...' statement

2007-04-30 Thread kwatch
What is the condition of module name which is available in 'from .. import ..' statement ? import os print os.path # from posixpath import sep # (no errors) from os.path import sep# (no errors, wow!) path = os.path