<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">


<META content="MSHTML 6.00.2800.1561" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff size=2>For 
argument's sake, let's&nbsp;<SPAN class=567410503-12092006>say </SPAN>your new 
code is saved as HelloWorld.py in a directory named modules, which&nbsp;is 
a&nbsp;sub-directory under your main project files directory.&nbsp; Some may 
disagree, but using a single directory&nbsp;<SPAN class=567410503-12092006>like 
this </SPAN>for all your custom modules&nbsp;is a good 
method.</FONT></SPAN></DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff size=2>import 
sys</FONT></SPAN></DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff 
size=2>sys.path.append("./modules")</FONT></SPAN></DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff size=2>import 
HelloWorld</FONT></SPAN></DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=123290103-12092006><FONT face=Arial color=#0000ff 
size=2>Bobby</FONT></SPAN></DIV></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  python-win32-bounces@python.org [mailto:python-win32-bounces@python.org]<B>On 
  Behalf Of </B>Christian Menge<BR><B>Sent:</B> Monday, September 11, 2006 7:49 
  PM<BR><B>To:</B> python-win32@python.org<BR><B>Subject:</B> [python-win32] 
  IMPORT path<BR><BR></FONT></DIV>Guys,<BR><BR>I have a simple script that will 
  create a window and print "Hello World". What I want to do is import this 
  script into another script which control may program. The problem I'm having 
  is with the Import path. When I move my "Hello World" script away from the 
  development directories the path gets lost and Python can not find the 
  modules. <BR><BR>As a C++ developer I would simply compile my project 
  statically....which includes all of the libraries in one place/package. How do 
  I do this with Python?<BR><BR>Christian<BR></BLOCKQUOTE></BODY></HTML>