Importing Files

anushya beauty abbi_0382 at
Fri Mar 3 06:40:44 CET 2006

      I am new to this python. I have installed python 2.4 in my windows xp system. 
  My issue is:
  i have three directories with some files. 
  ex: Dir ---> Dir1 /
         "   ---> Dir2 /
         "   ---> Dir3 /
  These are the example directories i have. (Under Dir--->Dir1, Dir2  and Dir3; Under Dir1 --->; Dir2 --->; Dir3  ----> 
  In, i am importing the and using the command: 
  from file1.1 import *
  from file2.1 import  *
  Now, my problem is, file1.1 is imported and i can access the values  that are used in that file. But the file2.1 is not imported and  returning the error message as "ImportError: No module named file2.1".  I couldn't access the var used in that file. Actually, both the files  are from different directories only. Then, why onr file is imported and  another is not imported?.
  My Question is: How to import the files from the different directory to the current file?.
  Anybody please reply me, i have strucked in this simple file importing concept.
  Thanks and Regards,
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list