<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.5700.6" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV>
<DIV><FONT face=Verdana size=2><FONT face=Verdana size=2>to Mateusz
Loskot:</FONT></DIV></DIV>
<DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>thank you very much!</FONT></DIV>
<DIV><FONT face=Verdana size=2>I'm sorry to my unclearly language.</FONT></DIV>
<DIV><FONT face=Verdana size=2>I use the IDE PythonWin.</FONT></DIV>
<DIV>According to your direction i have solved my problem.</DIV>
<DIV>It's really like you say,i have set the Python path but not set the OS's
Path to search my dll,so the problem occur.</DIV>
<DIV>Thanks again!</DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left>
<DIV align=left><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT color=#c0c0c0><FONT face=Verdana size=2>贠建明</FONT></DIV>
<DIV><FONT face=Verdana size=2>2006-11-06</FONT></FONT></DIV></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发件人:</STRONG> Mateusz
Loskot</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发送时间:</STRONG>
2006-11-06 00:35:48</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>收件人:</STRONG>
gdal-dev@lists.maptools.org</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>抄送:</STRONG> </FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>主题:</STRONG> Re: [Gdal-dev]
Beginner problem - can't load DLL</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>贠建明 wrote:</DIV>
<DIV>> what is the detail to set up my IDE to work with the FWTools's python</DIV>
<DIV>> version?</DIV>
<DIV> </DIV>
<DIV>What do you mean "my IDE"?</DIV>
<DIV> </DIV>
<DIV>> I have modify my set up by it still report can't load Dll.</DIV>
<DIV>> </DIV>
<DIV>> I have Edit all the value under Tools|Edit python path| to</DIV>
<DIV>> 'C:\\FWTools' like</DIV>
<DIV>> but when i check the sys.path it's value like the following message:</DIV>
<DIV> </DIV>
<DIV>What's Tools|Edit?</DIV>
<DIV> </DIV>
<DIV>> PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)]</DIV>
<DIV>> on win32.</DIV>
<DIV>> Portions Copyright 1994-2004 Mark Hammond (mhammond@skippinet.com.au</DIV>
<DIV>> <mailto:mhammond@skippinet.com.au
>) - see 'Help/About PythonWin' for</DIV>
<DIV>> further copyright information.</DIV>
<DIV>> > > > import sys</DIV>
<DIV>> > > > print(sys.path)</DIV>
<DIV>> ['', 'C:\\WINDOWS\\system32\\python23.zip', 'C:\\FWTools\\bin',</DIV>
<DIV>> 'C:\\FWTools\\pymod', 'C:\\Python23\\DLLs', 'C:\\Python23\\lib',</DIV>
<DIV>> 'C:\\Python23\\lib\\plat-win', 'C:\\Python23\\lib\\lib-tk',</DIV>
<DIV>> 'C:\\Python23\\Lib\\site-packages\\pythonwin', 'C:\\Python23',</DIV>
<DIV>> 'C:\\Python23\\lib\\site-packages',</DIV>
<DIV>> 'C:\\Python23\\lib\\site-packages\\win32',</DIV>
<DIV>> 'C:\\Python23\\lib\\site-packages\\win32\\lib']</DIV>
<DIV>> > > > import gdal</DIV>
<DIV>> Traceback (most recent call last):</DIV>
<DIV>> File " <interactive input
>", line 1, in ?</DIV>
<DIV>> File "C:\FWTools\pymod\gdal.py", line 191, in ?</DIV>
<DIV>> import _gdal</DIV>
<DIV>> ImportError: DLL load failed: 找不到指定的模块。</DIV>
<DIV> </DIV>
<DIV>I suppose the problem is that GDAL DLL can't be found by your IDE,</DIV>
<DIV>whatever the IDE means.</DIV>
<DIV>Try to add path where GDAL DLL file lives to system-wide or user's</DIV>
<DIV>PATH environment variable.</DIV>
<DIV>sys.path represents Python's PYTHONPATH, not Windows PATH where exe and</DIV>
<DIV>dll files are searched for.</DIV>
<DIV> </DIV>
<DIV>Alternatively, you can try to open FWTools command line (use shortcut in</DIV>
<DIV>Start Menu -
> FWTools) and run your IDE from command line, then it should</DIV>
<DIV>inherit PATH settings from FWTools shell.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Cheers</DIV>
<DIV>-- </DIV>
<DIV>Mateusz Loskot</DIV>
<DIV><A href="http://mateusz.loskot.net">http://mateusz.loskot.net</A></DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV></FONT></DIV></BODY></HTML>