Question: I am trying to write a batch file that creates one event if a text string is found and another if the string is not found. What I have so far is:

```
rem ***************************************************************************************************************************************************************
rem *  If the log file contains the 'copied' word log an event
rem ***************************************************************************************************************************************************************

find /c "copied" C:\Richards Folders\backup service\create events and logs\test backup log\backup.log
if errorlevel 1 goto ONE
if errorlevel 0 goto ZERO

:ZERO
eventcreate /L Application /T Information  /SO "BackUp Service" /ID 900 /D "Copied in backing up files to the back-up store. For more details look in C:\Richards Folders\backup service\create events and logs\test backup log."
goto END

:ONE
eventcreate /L Application /T Error  /SO "BackUp Service" /ID 901 /D "Error in backing up files to the back-up store. For more details look in C:\Richards Folders\backup service\create events and logs\test backup log."
:END

```

Clearly I am doing something wrong because it either always reports success even when I tell the script to look for a nonsense text or it reports failure when the correct text is present.

What is wrong in my code?

Answer: 
You can use curses cross-platform (Windows, MacOS, GNU/Linux) if you install manually for Windows or like other package in others.

1. Install wheel package. If you need more info about [wheel click here](http://pythonwheels.com/).
2. Go to [this repository](http://www.lfd.uci.edu/~gohlke/pythonlibs/).
3. Download a package with your python version, in example for python 3.4:

```
curses-2.2-cp34-none-win_amd64.whl

```
4. Install it (this command if for windows, in GNU/Linux install like other package)

```
python -m pip install curses-2.2-cp34-none-win32.whl

```
5. Just include in your python script:

```
import curses 

```

You can use curses wrapper for python. Works in Fedora 25 in all terminals, and Windows 10 using git bash, powershell, or cmd.

Update:

* An alternative to curses in Windows [here](https://www.openhub.net/p/wcurses).
* Console user interface in Windows [here](https://github.com/urwid/urwid).
* An interesting tutorial [here](http://www.ibm.com/developerworks/library/l-python6/).
You can try [my mirror of unicurses](https://github.com/Chiel92/unicurses), which includes pdcurses dlls. I have it currently up and running on windows 7 with python 3.5.0.

To quickly test if it works for you, just clone the repository and create and run a python script within its toplevel directory containing something like

```
from unicurses import *
stdscr = initscr()
addstr("hello world")
getch()

```