5N/A@echo off
5N/Arem
5N/Arem CDDL HEADER START
5N/Arem
5N/Arem The contents of this file are subject to the terms of the
15N/Arem Common Development and Distribution License (the "License").
5N/Arem You may not use this file except in compliance with the License.
15N/Arem
5N/Arem You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5N/Arem or http://www.opensolaris.org/os/licensing.
15N/Arem See the License for the specific language governing permissions
5N/Arem and limitations under the License.
5N/Arem
5N/Arem When distributing Covered Code, include this CDDL HEADER in each
5N/Arem file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5N/Arem If applicable, add the following below this CDDL HEADER, with the
5N/Arem fields enclosed by brackets "[]" replaced with your own identifying
5N/Arem information: Portions Copyright [yyyy] [name of copyright owner]
5N/Arem
5N/Arem CDDL HEADER END
5N/Arem
5N/Arem Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
5N/Arem
5N/A
5N/Asetlocal
5N/Aset CMDSCRIPT=client.py
5N/Aset MY_HOME=%~dp0
5N/Aset MY_IPS_BASE=%MY_HOME%\..\..
set PYTHONPATH=%PYTHONPATH%;%MY_IPS_BASE%\usr\lib\python2.7\vendor-packages
set MY_BASE=%MY_HOME%\..\..\..
set PATH=%MY_BASE%\python;%PATH%
set PYTHONUNBUFFERED=yes
rem
rem find python.[exe/bat/cmd] on the %PATH%
rem
for %%i in (cmd bat exe) do (
for %%j in (python.%%i) do (
set PYEXE="%%~$PATH:j"
if not [%PYEXE%]==[""] (
%PYEXE% %MY_HOME%\%CMDSCRIPT% %*
goto :EOF
)
)
)
rem If we didn't find it above, try to invoke it using the
rem application associated with the python file extension (.py)
rem
"%MY_HOME%\%CMDSCRIPT%" %*