There's still some work to do to get LatexWiki to work under plain Windows.

To keep things clean, I'll post my findings here. In the end we can rewrite this page as an installation manual.

pipes and system commands on windows --Bill Page, Tue, 15 Aug 2006 06:26:26 -0700 reply

EmmaLaurijssens wrote:

> I found a couple of lines of code which perform some file locking
> or something similar. It was a Unix-only method.

What you saw was a method making a call to an external program and to communicate with it via pipes without causing the calling program to block in the case of an error. You are right that this is Unix specific. But it is not critical. All we need is a reliable method to call an external program and communicate with it.

> we should get this to work without depending on 3rd party libraries
> like MS's Unix services for Windows or Cygwin

Yes, that should be no problem. Of course there are a few other dependencies to satisfy like: installing Miktex, ghostscript, and PIL.

pipes and system commands on windows --EmmaLaurijssens, Mon, 16 Oct 2006 09:57:25 -0700 reply

I've finally gotten around to installing the necessary components.

> What you saw was a method making a call to an external program and to communicate with it via pipes

to be more specific to my previous remark: util.py imports fcntl which is only available on Unix.

fcntl --Bill Page, Mon, 16 Oct 2006 14:10:23 -0700 reply

fcntl is called on linux in an attempt to make the popen call "non-blocking". This is not possible on Windows but in principle popen should still work - it might just be more sensitive to error conditions.

The best and most portable solution for communicating with an external program is probably 'expect':

http://expect.nist.gov

I have heard that there is a Python interface to this version of 'expect' but so far I haven't been able to find it online.

There is also a "pure Python" version but unfortunately it does not yet support Windows":

http://pexpect.sourceforge.net