Skip to content

Instantly share code, notes, and snippets.

@ycui1
Created November 1, 2021 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ycui1/9baf3b87976842c384c2561952fe4cea to your computer and use it in GitHub Desktop.
Save ycui1/9baf3b87976842c384c2561952fe4cea to your computer and use it in GitHub Desktop.
from pywebio import input as pin
from pywebio import output as pout
pout.put_code("""pin.input("What's your favorite fruit?")""")
pin.input("What's your favorite fruit?")
pout.put_code("""pin.slider("How old are you?", min_value=0, max_value=120)""")
pin.slider("How old are you?", min_value=0, max_value=120)
pout.put_code("""pin.checkbox("What toppings for pizza?", options=["pepperoni", "sausage", "chicken"])""")
pin.checkbox("What toppings for pizza?", options=["pepperoni", "sausage", "chicken"])
pout.put_code("""pin.select("Who's GOAT in NBA?", options=["Bryant", "Jordan", "James"])""")
pin.select("Who's GOAT in NBA?", options=["Bryant", "Jordan", "James"])
pout.put_code("""pin.radio("Are you ready to try pyWebIO?", options=["Yes", "No"])""")
pin.radio("Are you ready to try pyWebIO?", options=["Yes", "No"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment