<type>documentation</type>
<domain>proj</domain>
<id>remote-python-env</id>
<title>Specifying Environment for the Remote Python</title>
<date>$Date: 2010-05-14 11:53:19 -0400 (Fri, 14 May 2010) $</date>
<version>$Revision: 22093 $</version>
<product-version>6+</product-version>
<product>pro+</product>

Wing uses any ``Environment`` you specify in ``Project Properties`` to execute, debug, or
test your code.  But this environment cannot be used when running the remote agent, since
it is started in the environment provided by ``ssh`` or ``plink.exe``.

As a result, if the Python installation on your remote host needs certain environment
variables in order to run, it may fail to start when Wing attempts to run the remote agent
with it.

To work around this, create a shell script that sets the necessary environment and starts
up Python.  For example, if your Python needs ``PYTHONHOME`` and ``PYTHONPATH`` to be set you
might write something like this::
  
  #!/bin/bash
  export PYTHONHOME=/
  export PYTHONPATH=/lib/python2.7
  python $*

Then ``chmod +x`` the above script so it is executable and set the ``Python Executable`` in
your remote host configuration to its full path.

