<div>That worked. Thanks.</div>
<div>Victor<br><br></div>
<div class="gmail_quote">On Thu, Apr 17, 2008 at 2:18 PM, Raúl Gómez C. <<a href="mailto:nachogomez@gmail.com">nachogomez@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Victor, you can do this in order to load your own modules:<br><br><span style="FONT-FAMILY: courier new,monospace">import sys,os</span><br style="FONT-FAMILY: courier new,monospace">
<span style="FONT-FAMILY: courier new,monospace">sys.path.append(os.getcwd())</span><br style="FONT-FAMILY: courier new,monospace"><br style="FONT-FAMILY: courier new,monospace"><span style="FONT-FAMILY: courier new,monospace">import your_module</span><br style="FONT-FAMILY: courier new,monospace">
<br><br><br>
<div class="gmail_quote">
<div>
<div></div>
<div class="Wj3C7c">On Fri, Apr 18, 2008 at 12:34 PM, Ben Kaplan <<a href="mailto:bskaplan14@yahoo.com" target="_blank">bskaplan14@yahoo.com</a>> wrote:<br></div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div class="Wj3C7c">
<div>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">It might be something in mod python. Try asking on their mailing list.<br><br>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<div>----- Original Message ----<br>From: Victor Subervi <<a href="mailto:victorsubervi@gmail.com" target="_blank">victorsubervi@gmail.com</a>><br></div>
<div>
<div></div>
<div>To: Ben Kaplan <<a href="mailto:bskaplan14@yahoo.com" target="_blank">bskaplan14@yahoo.com</a>><br>Cc: <a href="mailto:python-list@python.org" target="_blank">python-list@python.org</a><br>Sent: Thursday, April 17, 2008 10:47:34 AM<br>
Subject: Re: Importing My Own Script<br><br>
<div class="gmail_quote">On Thu, Apr 17, 2008 at 8:52 AM, Ben Kaplan <<a href="mailto:bskaplan14@yahoo.com" target="_blank" rel="nofollow">bskaplan14@yahoo.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">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. </div>
</div></div></blockquote>
<div> </div>
<div>Well, now that´s what I thought! But no, it doesn´t work! Both scripts are in the same folder. Here´s the error:</div>
<div> </div>
<div>[Thu Apr 17 07:45:50 2008] [error] [client <a href="http://190.166.0.245/" target="_blank" rel="nofollow">190.166.0.245</a>] PythonHandler mod_python.cgihandler: File "/var/www/vhosts/<a href="http://livestocksling.com/httpdocs/bre/test.py" target="_blank" rel="nofollow">livestocksling.com/httpdocs/bre/test.py</a>", line 3, in ?\n import test2 <br>
[Thu Apr 17 07:45:50 2008] [error] [client <a href="http://190.166.0.245/" target="_blank" rel="nofollow">190.166.0.245</a>] PythonHandler mod_python.cgihandler: ImportError: No module named test2 <br></div>
<div>I´m running through Plesk, if that makes a difference.</div>
<div>TIA,</div>
<div>Victor</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif"><span></span>
<div>
<div></div>
<div><br>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">----- Original Message ----<br>From: Victor Subervi <<a href="mailto:victorsubervi@gmail.com" target="_blank" rel="nofollow">victorsubervi@gmail.com</a>><br>
To: <a href="mailto:python-list@python.org" target="_blank" rel="nofollow">python-list@python.org</a><br>Sent: Thursday, April 17, 2008 9:45:10 AM<br>Subject: Importing My Own Script<br><br>
<div>Hi:</div>
<div>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?</div>
<div>TIA,</div>
<div>Victor</div></div><br></div></div></div></div>
<div><br>
<hr size="1">
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ" target="_blank" rel="nofollow">Try it now.</a></div>
</div></blockquote></div><br></div></div></div><br></div></div>
<div>
<div></div>
<div><br>
<hr size="1">
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ" target="_blank">Try it now.</a></div></div></div><br>
</div></div>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>
Nacho<br>Linux Counter #156439 </font><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>