.. _open_a_popy_command_prompt: 

Open a |popy| Command Prompt
##############################

To gain access to the :ref:`popy_tools` you need to invoke the |popy| command prompt environment.

There are three main ways of starting a |popy| command prompt:-

* :ref:`desktop_shortcut_method`
* :ref:`popy_env_method` 
* :ref:`copy_popy_cmd_method`

To check that you are currently within a |popy| environment, see :ref:`verify_popy_env`.

.. _desktop_shortcut_method: 

Desktop Shortcut Method
=========================

Left mouse click on the '|popy| Command Prompt' shortcut on your Desktop or alternatively within the Start Menu (in the |popy| folder). This will open a |popy| command prompt in the directory where you installed |popy|.

For example, if you click the |popy| shortcut and installed |popy| to the directory:-

.. code-block:: console

    c:\PoPy

You should see something like :numref:`fig_popy_dos_c_popy`:-

.. _fig_popy_dos_c_popy:

.. figure:: dos_c_popy.png
    :width: 50%
    :align: center
    
    |popy| dos prompt
    
.. _popy_env_method:

Terminal popy_env Method
==========================

Open a command prompt in **any** folder on your computer. It is highly recommended that you use the traditional 'cmd' dos prompt, in preference to the Windows Powershell. 

A simple way of opening a command prompt in a specific folder is to:-

* navigate to the folder in Windows Explorer
* left mouse click on the path dialog box
* type 'cmd'
* press return

For example if you navigate to the directory:-

.. code-block:: console

    c:\Users\david\

Then type 'cmd' over the Windows Explorer path, a plain dos command prompt should appear like this :numref:`fig_plain_dos_prompt`:-

.. _fig_plain_dos_prompt:

.. figure:: dos_plain.png
    :width: 50%
    :align: center
    
    Plain command prompt
    
Then type:-

.. code-block:: console

    $ popy_env
    
You should see the text:-

.. code-block:: console

    Welcome to PoPy Binary

After running :ref:`popy_env` the terminal should look something like :numref:`fig_popy_dos_prompt_v2`:-
    
.. _fig_popy_dos_prompt_v2:

.. figure:: dos_popy.png
    :width: 50%
    :align: center
    
    |popy| command prompt
    
Note the colour of the dos prompt text will change from white to pale blue.
    
.. _copy_popy_cmd_method: 

Copy popy_cmd.exe Method
===========================
    
An alternative method for starting |popy| in any folder is to simply copy the file 'popy_cmd.exe' from your |popy| install directory to a new location.

Then simply clicking on 'popy_cmd.exe' will start a |popy| environment in the same directory.
    
For example copy this file:-

.. code-block:: console

    c:\PoPy\popy_cmd.exe
    
to the directory:-

.. code-block:: console

    c:\Users\david\my_work\   
    
Click on 'popy_cmd.exe' within the 'my_work' directory and you should see :numref:`fig_popy_dos_prompt_my_work`:-

.. _fig_popy_dos_prompt_my_work:

.. figure:: dos_my_work.png
    :width: 50%
    :align: center
    
    |popy| command prompt in the 'c:\\Users\\david\\my_work\\' folder.
    
.. _verify_popy_env:

Verify |popy| Environment
=========================
    
The light blue text signifies that you are within a |popy| environment. You can verify this further by running :ref:`popy_info`:-

.. code-block:: console

    $ popy_info
    
You can also verify that the system path has changed. e.g in a command prompt:-

.. code-block:: console

    $ echo %PATH%
        
The system path should start with:-

.. code-block:: console

    c:\PoPy\bin
    
Or wherever |popy| is installed.

You should be able to run all the :ref:`popy_tools` now.

