We were speaking in general about popeye, and now we go to some practical things about running popeye. This page will show you the 1st method (of 2 methods mentioned before) of how to run popeye –
Cmd-commands to run popeye
To run popeye in Command prompt (cmd-window) we have to run the Command Prompt first. To do it go to the START menu of Windows and choose the following menu: Program files -> Accessories -> Command Prompt. It might be that you have the Command Prompt right in the START menu. But you’ll get the similar view to this one – see Command Prompt at the top of the left menu:
Or you can simply type cmd at the empty field of the bottom part of this menu, which says Search programs and files – this way:
See the empty field on the bottom part of the picture above. The cursor is already in that field. Now we type cmd and the up menu will show the program:
Choose cmd from the list of programs you’ve got (on the top of the menu at the picture above).
When you have started the Command Prompt – the black window of command prompt appears at the screen with the promt like this:
C:> _
or with some other path like on the picture below:
You have to change a directory to the one where your popeye program is installed (in this example I have popeye file py.exe in the directory C:PY-459):
C:> cd PY-459 (press [ENTER] key after typing cd PY-459)
Or on my picture I have to type “cd ….PY-459“
then press [ENTER] key – and you’re in the directory where you have your popeye file – in the C:PY-459
Now you can run popeye right here, by typing its name (py or pywin32 or pywin64).
To run popeye using just its name is the simplest option:
C:PY-459> py (press [ENTER] key after typing py)
In this case you will get almost the same result as in the option where you had popeye file as an icon on your Desktop and run as usual program, but here you’ll be able to use the right button of your mouse to get a menu choice [PASTE] for pasting your problem for popeye from the file, but not entering it manually.
On the picture below you see the popeye running and waiting for the problem, and with the click of the right button of your mouse you can get the menu and the PASTE option from it:
If you have your notation for the problem written somewhere in your files, you can make a copy of it and to paste here (of course, you can simply type the notation right on the screen).
The advantage of pasting is that you can easy make changes in your file and than paste the whole notation. Otherwise you have to type it manually every time from the beginning till the end of it.
I’have pasted the problem into the popeye-window at the picture below. Now I have only to press the [ENTER] key to make popeye solve it.
After pressing [ENTER] key – popeye starts solving. The solution in my case looks like this:
Now the cmd-prompter C:PY-459> is waiting for the next your command.
You can type py again to start popeye and to solve another problem.
More complicated option is to run popeye with some arguments. I think that the most useful is the ability of input/output redirection. In this case your popeye can work not only with the data from the screen and produce the result to the screen, but can also use files. For instance, in this example, the notation of the problem for popeye is stored in a text file inputfilename.txt and we run popeye this way:
C:PY-459> py < inputfilename.txt
This option might be useful if you have a problem for solving stored in a file.
Another example is when you get the result of solving in a text file outputfilename.txt instead of the screen. Run popeye this way:
C:PY-459> py > outputfilename.txt
This option might be useful either for a long solution – that cmd-window’s size doesn’t allow you to see the whole solution – or for the better abilities to use the results of solving – editing, copying etc. In this case after popeye stops solving, you can open your file with the result using any editor for text files (f.i. Notepad).
And of course, you can combine the both – the input from your file and the result into your file – than run popeye this way:
C:PY-459> py < inputfilename.txt > outputfilename.txt
Anybody will tell: It’s not convenient to type so many commands! – Then read about the batch scripts to run popeye!
Take care of your Buy Adipex weight and your habits.
Please feel free to send me comment/questions(English, Russian, Latvian)! Use Leave a Reply form below or my email address.
I can add some more info later, based on your comments!