Webware And Cygwin

I had no problems to install and run Webware using Cygwin on Windows 2000, but MakeAppWorkDir.py failed.

A first thing to notice: you must use the Cygwin way to specify the directory even if invoking from the Windows command prompt. Don't say:

python MakeAppWorkDir_.py t:\data\luc\webware\app2

because you will get an IOError. But say:

python MakeAppWorkDir_.py /cygdrive/t/data/luc/webware/app2

This is understandable. Don't forget that your Cygwin Python version has sys.platform == 'cygwin'.

The next problem is more difficult. Here is how it looks: When I started the file appserver.bat, I got the following error:

ConfigurationError_: Invalid configuration file,
/cygdrive/t/data/luc/webware/app2/Configs/Application.config

Exiting AppServer

This came because of a newline representation conflict. Although the config files in my main WebWare directory contain UNIX-style newlines, the .config files created by MakeAppWorkDir.py have Windows-style newlines.

The work-around is to convert them manually:

T:\data\luc\webware\app2\Configs>bash
(this is /cygdrive/t/DATA/LUC/HOME/.bashrc running)
bash-2.05b$ dos2unix *.config
AppServer_.config: done.
Application.config: done.
CGIAdapter.config: done.
FCGIAdapter.config: done.
ModPythonAdapter_.config: done.
OneShotAdapter_.config: done.
bash-2.05b$

I don't know who is to blame for this bug. It seems to me that Python on Cygwin is able to read text files with UNIX-style newlines, but creates them with UNIX-style newlines. Although shutil.copyfile() opens them in binary mode. Strange...

-- LucSaffre - 11 Sep 2002