[FWTools] Using Python ogr module in FWTools Shell
Matt Wilkie
matt.wilkie at gov.yk.ca
Tue Oct 24 14:09:36 EDT 2006
David Fawcett wrote:
> I am trying to use the Python ogr module in the FWTools shell.
>
> I can type 'python' and then 'import ogr' and I don't get any errors
>
> but if I try to run a script called hw.py at the FWTools command prompt,
> I get the below error.
>
> The contents of hw.py are:
>
> import os
> import ogr
>
> print "hello world"
>
> The error is:
>
> C:\>hw.py
> Traceback (most recent call last):
try this instead:
C:\path\to\fwtools\python\python c:\hw.py
If fwtools python is in path, you can shorten that to simply "python
c:\hw.py"
Find out which python is being found first with:
C:\>for %I in (python.exe) do @echo --- %~$PATH:I
--- c:\local\fwtools\python\python.exe
--
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
More information about the FWTools
mailing list