On Fri, Aug 29, 2014 at 9:39 AM, diliup gabadamudalige <dili...@gmail.com> wrote: > this is the easiest way to do this > > # one.py is in the \data\ directory > # two.py is in the \data\img\ directory > # three.py is in the \data\img\sc\ directory > > ## this program is in the learn_music dir > > ## expanding the file path add a . before the new dir > > ## each directory you need to load a module from needs to have __init__.py > file inside the directory. It can be an empty file but it needs to be there. > That's how python knows that you can load a module from this directory. my > one.py, two.py and three.py modules each have a string called a in it. You > can have classes or functions which can be called in the same way. > > from data import one # / data/ > from data .img import two # /data/img/ > from data .img.sc import three # /data/img/sc/ > > print one.a, two.a, three.a > > hope this helps
So far this doesn't work. I'm pretty convinced it's either a Python version issue (2.4.3 and 2.6.6.) or pure Operator Error. Leaning towards the latter. Thanks! Leam -- Mind on a Mission _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor