- 积分
- 362863
好友
记录
日志
相册
回帖0
主题
分享
精华
威望 旺
钢镚 分
推荐 人
|
注册后推荐绑定QQ,之后方才可以使用下方的“用QQ帐号登录”。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
This document describes a Stata plugin for embedding the Python programming langugae within Stata. In short, the plugin gives the user the ability to use Python to interact with Stata data values, matrices, macros, and numeric scalars. The plugin can be used interactively inside the Stata GUI, or can be
; P3 G* ?+ P/ R" j6 xused with Python les, and Python les can be run separately or in combination with .ado or .do les.
6 I4 ?+ B5 J3 `, E2 e0 x- b% @4 Y$ ~- Z
This code has been tested only on Windows 7, 64-bit computers, in Stata versions 12.1 and 13.0, with Python 3.3. Python 3.2 and 3.1 can probably be used instead of Python 3.3, but that has not been tested. The plugin will not work with Python 2. The code was developed for Stata 12.1 but works in
" n: K- ~1 ]+ G( f4 ?' k0 ]9 |( X; cStata 13.0, except that string values must be ASCII and be no more than 244 characters long. In other words, the code works in Stata 13.0 when used with string values allowed in Stata 12.1.
' n' R+ w8 T* Q- \1 {- J+ ^( A, ]7 x# k
Users will need to compile the plugin themselves. Instructions for compiling on Windows are given in §3. Users will need Stata, Python (specically, CPython, the most common version), and a C compiler. Users will also need access to the le Python.h, which is included in many distributions of Python.
4 f; ~* k3 B$ b0 w( D3 dThe Windows installer at http://www.python.org/getit/ will install all of the Python les you need. * b" J5 {, }5 Z' P* {
" }' l; R5 S' S" x
This document assumes the reader has some experience with Python, but extensive experience is not required. |
|