# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # PYTHON 2 / 3 comptability : # bootstrap.py must be runnable with Python 2 and 3 # Remove interactive mode displayhook import sys import signal try: import StringIO as io except ImportError: import io as io sys.displayhook = lambda x: None def intHandler(signum, frame): # Set the signal handler print ("Paragraph interrupted") raise KeyboardInterrupt() signal.signal(signal.SIGINT, intHandler) def help(): print ('%html') print ('
The interpreter is compatible with Python 2 & 3.
')
print ('To change Python version, ')
print ('change in the interpreter configuration the python.path to the ')
print ('desired version (example : python.path=/usr/bin/python3)
The interpreter can use all modules already installed ') print ('(with pip, easy_install, etc)
') print (' print "${input_form(name)=defaultValue}"')
print (' print "${select_form(Selection Form)=o1,o1|o2}"')
print (' print "${checkbox:checkbox_form=o1,o1|o3}"')
print ('import matplotlib.pyplot as plt plt.figure() (.. ..) zeppelin_show(plt) plt.close()''') print ('
zeppelin_show(plt,width='50px') zeppelin_show(plt,height='150px')