> I have some .py files that have things I need to use, sometimes > it's the functions and sometimes it's the whole .py (they have no > functions) > > how do I use them in my other .py codes?
Import them at the top of your other .py file(s): import <yourfile> (without the .py extension). If they're in the current directory, you're fine. Otherwise you may need to set the PYTHONPATH variable. See chapter 6 in the Python tutorial, especially section 6.1.1: http://docs.python.org/tut/node8.html#SECTION008110000000000000000 Evert _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
