Sion Arrowsmith wrote:
> Peter Otten <[EMAIL PROTECTED]> wrote:
>>tow wrote:
>>> sys.path.append(os.path.join(project_directory, os.pardir))
>>> project_module = __import__(project_name, {}, {}, [''])
>>> sys.path.pop()
>>Ouch.
>
> I presume that "Ouch" is in consideration of what mi
On Aug 12, 4:59 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> tow wrote:
> > On Aug 12, 9:56 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> >> tow wrote:
>
> >> > Basically, I had thought that import and imp.find_module used exactly
> >> > the same
> >> > search path, but the above example shows that
Peter Otten <[EMAIL PROTECTED]> wrote:
>tow wrote:
>> sys.path.append(os.path.join(project_directory, os.pardir))
>> project_module = __import__(project_name, {}, {}, [''])
>> sys.path.pop()
>Ouch.
I presume that "Ouch" is in consideration of what might happen if
the subject of the __
tow wrote:
> On Aug 12, 9:56 am, Peter Otten <[EMAIL PROTECTED]> wrote:
>> tow wrote:
>
>> > Basically, I had thought that import and imp.find_module used exactly
>> > the same
>> > search path, but the above example shows that at least in this
>> > circumstance they
>> > don't; import is picking
On Aug 12, 9:56 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> tow wrote:
> > Basically, I had thought that import and imp.find_module used exactly
> > the same
> > search path, but the above example shows that at least in this
> > circumstance they
> > don't; import is picking up additional search
tow wrote:
>>> > I have a python script (part of a django application, if it makes any
>> > difference) which is exhibiting the following behaviour:
>>
>> > import my_module # succeeds
>> > imp.find_module("my_module") # fails, raising ImportError
>>
>> > which is completely baffling me. According
On Aug 12, 4:59 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Mon, 11 Aug 2008 19:19:19 -0300, tow <[EMAIL PROTECTED]>
> escribi :
>
> > I have a python script (part of a django application, if it makes any
> > difference) which is exhibiting the following behaviour:
>
> > import my_mod
En Mon, 11 Aug 2008 19:19:19 -0300, tow <[EMAIL PROTECTED]>
escribi�:
I have a python script (part of a django application, if it makes any
difference) which is exhibiting the following behaviour:
import my_module # succeeds
imp.find_module("my_module") # fails, raising ImportError
which is
I have a python script (part of a django application, if it makes any
difference) which is exhibiting the following behaviour:
import my_module # succeeds
imp.find_module("my_module") # fails, raising ImportError
which is completely baffling me. According to sys.path, both should
fail; the direct