Skip to main content.
home | support | download

Back to List Archive

[swish-e] External-Program on Windows

From: Richard Lewis <richard.lewis(at)not-real.gold.ac.uk>
Date: Mon Feb 23 2009 - 17:41:49 GMT
Hi there,

I'm having to port my application from Linux to Windows Server
2003. Part of it uses Swish-e (2.4.5; and works brilliantly on Linux)
but I'm having problems getting equivalent behaviour on Windows.

The data that I'm indexing is stored in one big file which has lots of

Path-Name: ....
Content-Length: ....
Document-Type: ...

....

records.

It's indexed with Swish-e using a config file like this:

IndexFile ...
IndexName ....
PropertyNames ....
MetaNames ...
UndefinedMetaTags auto
SwishProgParameters "INDEX_DATA"
IndexDir cat

i.e. it's written to stdout using cat, and then Swish-e reads it from
there. This works fine on Linux.

Windows, however, doesn't have cat. Apparently you can use

copy [filename] CON:

to replicate cat's behaviour. In fact, though, this command bails out
after about 10 lines claiming that there's not enough storage space to
continue.

So I tried writing a cat in Python. (I'm using lots of Python
elsewhere in my application.) So my Swish-e config file is now like
this:

SwishProgParameters "cat.py INDEX_DATA"
IndexDir python

However, whenever I try to index the data Swish-e complains, "Failed
to find external program `python`". I've tried various combinatons of
"python.exe" "C:\Python25\python.exe" etc. but none of them work.

Some other interesting points: it lists the contents of the PATH
variable it's checking and this includes the location of my python.exe
("C:\Python25"); also, if I give it the full path to my python.exe
using Windows' silly backslash path separators, Swish-e shows the path
with foward slashes in the error message.

Any ideas how to make this work?

Cheers,
Richard
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: ironchicken@jabber.earth.li
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+-------------------------------------------------------+
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |
+-------------------------------------------------------+
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Mon Feb 23 12:41:56 2009