{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/comments/64707875","id":64707875,"diff_hunk":"@@ -0,0 +1,114 @@\n+---\n+layout: page\n+title: \"Python Interpreter\"\n+description: \"Python Interpreter\"\n+group: manual\n+---\n+{% include JB/setup %}\n+\n+## Python 2 & 3 Interpreter for Apache Zeppelin\n+\n+## Configuration\n+<table class=\"table-configuration\">\n+  <tr>\n+    <th>Property</th>\n+    <th>Default</th>\n+    <th>Description</th>\n+  </tr>\n+  <tr>\n+    <td>python</td>\n+    <td>python</td>\n+    <td>Path of the already installed Python binary (could be python2 or python3).\n+    If python is not in your $PATH you can set the absolute directory (example : /usr/bin/python)\n+    </td>\n+  </tr>\n+</table>\n+\n+## Enabling Python Interpreter\n+\n+In a notebook, to enable the **Python** interpreter, click on the **Gear** icon and select **Python**\n+\n+## Using the Python Interpreter\n+\n+In a paragraph, use **_%python_** to select the **Python** interpreter and then input all commands.\n+\n+The interpreter can only work if you already have python installed (the interpreter doesn't bring it own python binaries).\n+\n+To access the help, type **help()**\n+\n+## Python modules\n+The interpreter can use all modules already installed (with pip, easy_install...)\n+\n+## Apply Zeppelin Dynamic Forms\n+You can leverage [Zeppelin Dynamic Form]({{BASE_PATH}}/manual/dynamicform.html) inside your Python code.\n+\n+**Zeppelin Dynamic Form can only be used if py4j Python library is installed in your system. If not, you can install it with `pip install py4j`.**\n+\n+Example : \n+```python\n+%python\n+# Input fom\n+print (z.input(\"f1\",\"defaultValue\"))\n+\n+# Select fom\n+print (z.select(\"f1\",[(\"o1\",\"1\"),(\"o2\",\"2\")],\"2\"))\n+\n+#Checkbox form\n+print(\"\".join(z.checkbox(\"f3\", [(\"o1\",\"1\"), (\"o2\",\"2\")],[\"1\"])))\n+```\n+\n+\n+\n+\n+## Zeppelin features not fully supported by the Python Interpreter","path":"docs/interpreter/python.md","position":63,"original_position":63,"commit_id":"6db76d9a81cba9d504826f147dfadee9b225b116","original_commit_id":"6db76d9a81cba9d504826f147dfadee9b225b116","user":{"login":"bzz","id":5582506,"avatar_url":"https://avatars.githubusercontent.com/u/5582506?v=3","gravatar_id":"","url":"https://api.github.com/users/bzz","html_url":"https://github.com/bzz","followers_url":"https://api.github.com/users/bzz/followers","following_url":"https://api.github.com/users/bzz/following{/other_user}","gists_url":"https://api.github.com/users/bzz/gists{/gist_id}","starred_url":"https://api.github.com/users/bzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzz/subscriptions","organizations_url":"https://api.github.com/users/bzz/orgs","repos_url":"https://api.github.com/users/bzz/repos","events_url":"https://api.github.com/users/bzz/events{/privacy}","received_events_url":"https://api.github.com/users/bzz/received_events","type":"User","site_admin":false},"body":"I think current version is a correct one (short for \"Zeppelin features that are not fully supported ..\")","created_at":"2016-05-26T08:25:24Z","updated_at":"2016-05-26T08:25:24Z","html_url":"https://github.com/apache/incubator-zeppelin/pull/869#discussion_r64707875","pull_request_url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/comments/64707875"},"html":{"href":"https://github.com/apache/incubator-zeppelin/pull/869#discussion_r64707875"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869","id":68469944,"html_url":"https://github.com/apache/incubator-zeppelin/pull/869","diff_url":"https://github.com/apache/incubator-zeppelin/pull/869.diff","patch_url":"https://github.com/apache/incubator-zeppelin/pull/869.patch","issue_url":"https://api.github.com/repos/apache/incubator-zeppelin/issues/869","number":869,"state":"open","locked":false,"title":"[ZEPPELIN-502] Python interpreter group","user":{"login":"hriviere","id":12515751,"avatar_url":"https://avatars.githubusercontent.com/u/12515751?v=3","gravatar_id":"","url":"https://api.github.com/users/hriviere","html_url":"https://github.com/hriviere","followers_url":"https://api.github.com/users/hriviere/followers","following_url":"https://api.github.com/users/hriviere/following{/other_user}","gists_url":"https://api.github.com/users/hriviere/gists{/gist_id}","starred_url":"https://api.github.com/users/hriviere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hriviere/subscriptions","organizations_url":"https://api.github.com/users/hriviere/orgs","repos_url":"https://api.github.com/users/hriviere/repos","events_url":"https://api.github.com/users/hriviere/events{/privacy}","received_events_url":"https://api.github.com/users/hriviere/received_events","type":"User","site_admin":false},"body":"### What is this PR for?\r\nAdding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. \r\n\r\nThe interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change.\r\n\r\nI had a python helper  function (zeppelin_show() ) to easily display matplotlib graph as SVG.\r\n\r\n### What type of PR is it?\r\n[Feature]\r\n\r\n### Todos\r\n* [ ] - Code review\r\n* [ ] - Improve bootstrap.py : choose available helper functions and their names\r\n* [x] - Unit / IT tests ?\r\n\r\n### What is the Jira issue?\r\n[ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22)\r\n\r\n### How should this be tested?\r\n\r\n1. In interpreter screen, in Python section, specify in python.path the python binary you want to use\r\n2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities.\r\n3. Install py4j (pip install py4j) if you want to use input form\r\n\r\n### Screenshots \r\n![image](https://cloud.githubusercontent.com/assets/12515751/14936724/5108fb60-0ef4-11e6-93ea-232a037f7957.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/12515751/14943716/98a75c4a-0fe0-11e6-9d4b-e10c39d53a15.png)\r\n\r\n\r\n![image](https://cloud.githubusercontent.com/assets/12515751/14936715/0eec90de-0ef4-11e6-811b-7ebe46f0d279.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/12515751/14943722/b89b7824-0fe0-11e6-9c73-c12f7372d487.png)\r\n\r\n### Questions:\r\n* Does the licenses files need update? No\r\n* Is there breaking changes for older versions? No\r\n* Does this needs documentation? Yes\r\n\r\n","created_at":"2016-04-30T14:58:48Z","updated_at":"2016-05-26T08:25:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88e0f595106d6e68c65aa1efd1dc7774e1b2ecc1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-zeppelin/issues/869/comments","statuses_url":"https://api.github.com/repos/apache/incubator-zeppelin/statuses/6db76d9a81cba9d504826f147dfadee9b225b116","head":{"label":"hriviere:PR_interpreter_python","ref":"PR_interpreter_python","sha":"6db76d9a81cba9d504826f147dfadee9b225b116","user":{"login":"hriviere","id":12515751,"avatar_url":"https://avatars.githubusercontent.com/u/12515751?v=3","gravatar_id":"","url":"https://api.github.com/users/hriviere","html_url":"https://github.com/hriviere","followers_url":"https://api.github.com/users/hriviere/followers","following_url":"https://api.github.com/users/hriviere/following{/other_user}","gists_url":"https://api.github.com/users/hriviere/gists{/gist_id}","starred_url":"https://api.github.com/users/hriviere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hriviere/subscriptions","organizations_url":"https://api.github.com/users/hriviere/orgs","repos_url":"https://api.github.com/users/hriviere/repos","events_url":"https://api.github.com/users/hriviere/events{/privacy}","received_events_url":"https://api.github.com/users/hriviere/received_events","type":"User","site_admin":false},"repo":{"id":56181318,"name":"incubator-zeppelin-python-interpreter","full_name":"hriviere/incubator-zeppelin-python-interpreter","owner":{"login":"hriviere","id":12515751,"avatar_url":"https://avatars.githubusercontent.com/u/12515751?v=3","gravatar_id":"","url":"https://api.github.com/users/hriviere","html_url":"https://github.com/hriviere","followers_url":"https://api.github.com/users/hriviere/followers","following_url":"https://api.github.com/users/hriviere/following{/other_user}","gists_url":"https://api.github.com/users/hriviere/gists{/gist_id}","starred_url":"https://api.github.com/users/hriviere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hriviere/subscriptions","organizations_url":"https://api.github.com/users/hriviere/orgs","repos_url":"https://api.github.com/users/hriviere/repos","events_url":"https://api.github.com/users/hriviere/events{/privacy}","received_events_url":"https://api.github.com/users/hriviere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hriviere/incubator-zeppelin-python-interpreter","description":"Mirror of Apache Zeppelin (Incubating)","fork":true,"url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter","forks_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/forks","keys_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/teams","hooks_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/hooks","issue_events_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/issues/events{/number}","events_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/events","assignees_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/assignees{/user}","branches_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/branches{/branch}","tags_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/tags","blobs_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/git/refs{/sha}","trees_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/statuses/{sha}","languages_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/languages","stargazers_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/stargazers","contributors_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/contributors","subscribers_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/subscribers","subscription_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/subscription","commits_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/commits{/sha}","git_commits_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/git/commits{/sha}","comments_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/comments{/number}","issue_comment_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/issues/comments{/number}","contents_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/contents/{+path}","compare_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/merges","archive_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/downloads","issues_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/issues{/number}","pulls_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/pulls{/number}","milestones_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/milestones{/number}","notifications_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/labels{/name}","releases_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/releases{/id}","deployments_url":"https://api.github.com/repos/hriviere/incubator-zeppelin-python-interpreter/deployments","created_at":"2016-04-13T19:48:58Z","updated_at":"2016-04-30T14:52:16Z","pushed_at":"2016-05-22T13:29:29Z","git_url":"git://github.com/hriviere/incubator-zeppelin-python-interpreter.git","ssh_url":"git@github.com:hriviere/incubator-zeppelin-python-interpreter.git","clone_url":"https://github.com/hriviere/incubator-zeppelin-python-interpreter.git","svn_url":"https://github.com/hriviere/incubator-zeppelin-python-interpreter","homepage":null,"size":24606,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d481b56c50d421d513d27adf0f72e516a40be944","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":32848140,"name":"incubator-zeppelin","full_name":"apache/incubator-zeppelin","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-zeppelin","description":"Mirror of Apache Zeppelin (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-zeppelin","forks_url":"https://api.github.com/repos/apache/incubator-zeppelin/forks","keys_url":"https://api.github.com/repos/apache/incubator-zeppelin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-zeppelin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-zeppelin/teams","hooks_url":"https://api.github.com/repos/apache/incubator-zeppelin/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-zeppelin/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-zeppelin/events","assignees_url":"https://api.github.com/repos/apache/incubator-zeppelin/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-zeppelin/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-zeppelin/tags","blobs_url":"https://api.github.com/repos/apache/incubator-zeppelin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-zeppelin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-zeppelin/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-zeppelin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-zeppelin/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-zeppelin/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-zeppelin/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-zeppelin/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-zeppelin/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-zeppelin/subscription","commits_url":"https://api.github.com/repos/apache/incubator-zeppelin/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-zeppelin/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-zeppelin/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-zeppelin/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-zeppelin/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-zeppelin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-zeppelin/merges","archive_url":"https://api.github.com/repos/apache/incubator-zeppelin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-zeppelin/downloads","issues_url":"https://api.github.com/repos/apache/incubator-zeppelin/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-zeppelin/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-zeppelin/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-zeppelin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-zeppelin/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-zeppelin/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-zeppelin/deployments","created_at":"2015-03-25T07:00:06Z","updated_at":"2016-05-26T02:16:58Z","pushed_at":"2016-05-26T08:00:22Z","git_url":"git://github.com/apache/incubator-zeppelin.git","ssh_url":"git@github.com:apache/incubator-zeppelin.git","clone_url":"https://github.com/apache/incubator-zeppelin.git","svn_url":"https://github.com/apache/incubator-zeppelin","homepage":null,"size":101031,"stargazers_count":1490,"watchers_count":1490,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":742,"mirror_url":"git://git.apache.org/incubator-zeppelin.git","open_issues_count":98,"forks":742,"open_issues":98,"watchers":1490,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869"},"html":{"href":"https://github.com/apache/incubator-zeppelin/pull/869"},"issue":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/issues/869"},"comments":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/issues/869/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/pulls/869/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-zeppelin/statuses/6db76d9a81cba9d504826f147dfadee9b225b116"}}}}
{"actor":{"display_login":"bzz"}}