Import problem

Emile van Sebille emile at fenx.com
Fri Oct 20 09:46:47 EDT 2000


Are you trying to import names that have the extensions?
e.g.:shutil.py and shutil.pyc


--

Emile van Sebille
emile at fenx.com
-------------------


"Sindh" <skodela at my-deja.com> wrote in message
news:8spgic$1p6$1 at nnrp1.deja.com...
> Hi folks
>
> How can I import a module by giving a name of list
elements.
>
> Eg:
> for n in os.listdir('.'):
> import n
>
> but it fails. Can anyone find where I am going wrong. It
says 'no module
> called n'.
>
> Thanks
> sreekant
>
> --
> A man needs to sleep for 36 hours a day atleast.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list