You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/01/20 14:57:05 UTC

[GitHub] wangqiaoshi commented on a change in pull request #119: [LIVY-527] added autocompletion api and implementation for ipython

wangqiaoshi commented on a change in pull request #119: [LIVY-527] added autocompletion api and implementation for ipython
URL: https://github.com/apache/incubator-livy/pull/119#discussion_r249282542
 
 

 ##########
 File path: repl/src/main/resources/fake_shell.py
 ##########
 @@ -49,6 +49,22 @@
 
 TOP_FRAME_REGEX = re.compile(r'\s*File "<stdin>".*in <module>')
 
+def get_completer():
+    try:
+        __IPYTHON__
+        from IPython.core.completer import IPCompleter
+        ip = get_ipython()
+        ip_completer = IPCompleter(ip,global_namespace=global_dict)
+        global_dict['ip_completer'] = ip_completer
 
 Review comment:
   Completer will be different  when python interpreter is different.  The number of  completer global variable will be two,I don't know if that's appropriate?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services