On Thu, Apr 17, 2008 at 8:52 AM, Ben Kaplan <[EMAIL PROTECTED]> wrote:
> If x and y are in the same directory, just do "import x". If not, add the > directory containing x to sys.path. Then, "import x" should work. > Well, now that´s what I thought! But no, it doesn´t work! Both scripts are in the same folder. Here´s the error: [Thu Apr 17 07:45:50 2008] [error] [client 190.166.0.245] PythonHandler mod_python.cgihandler: File "/var/www/vhosts/ livestocksling.com/httpdocs/bre/test.py", line 3, in ?\n import test2 [Thu Apr 17 07:45:50 2008] [error] [client 190.166.0.245] PythonHandler mod_python.cgihandler: ImportError: No module named test2 I´m running through Plesk, if that makes a difference. TIA, Victor > > ----- Original Message ---- > From: Victor Subervi <[EMAIL PROTECTED]> > To: python-list@python.org > Sent: Thursday, April 17, 2008 9:45:10 AM > Subject: Importing My Own Script > > Hi: > How do I import my own script from a second script? That is, I have script > x and I want to import script y. How? > TIA, > Victor > > > ------------------------------ > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now.<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> >
-- http://mail.python.org/mailman/listinfo/python-list