25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20 CHAPTER 4. TESTING INSTALLATION AND COMPILING EXAMPLES<br />

set up global paths to the included <strong>Python</strong>: To use it, either execute <strong>Python</strong> with full path, or set up<br />

the PATH environment variable to include the relevant bin directory.<br />

<strong>The</strong> <strong>MOSEK</strong>/<strong>Python</strong> module structure is located under platform directory (mosek\7\tools\platform):<br />

64 bit <strong>MOSEK</strong>, <strong>Python</strong> 2.5+ win64x86\python\2<br />

32 bit <strong>MOSEK</strong>, <strong>Python</strong> 2.5+ win32x86\python\2<br />

64 bit <strong>MOSEK</strong>, <strong>Python</strong> 3 win64x86\python\3<br />

32 bit <strong>MOSEK</strong>, <strong>Python</strong> 3 win32x86\python\3<br />

Examples using the <strong>MOSEK</strong>/<strong>Python</strong> interface are found in<br />

mosek\7\tools\examples\python<br />

4.1.1 Running a <strong>Python</strong> example<br />

To run one of the distributed examples, open a DOS box and type<br />

C:<br />

cd "C:\Program Files\mosek\7\tools\examples\python"<br />

then to execute example lo1 type<br />

python lo1.py<br />

4.2 Implementation details<br />

<strong>The</strong> <strong>MOSEK</strong>/<strong>Python</strong> module is implemented as a pure <strong>Python</strong> module using ctypes to call native<br />

DLLs. <strong>The</strong> CTypes module is included in the <strong>Python</strong> standard library from 2.5 on.<br />

CTypes is considered an unsafe module, so it may be disabled under some circumstances, e.g. for web<br />

server scripts.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!