input() on skulpt vs trinket

174 views
Skip to first unread message

Timmy Chen

unread,
May 14, 2016, 11:55:40 AM5/14/16
to Skulpt
Using input() or raw_input() in skulpt.org will bring up a javascript prompt() box, yet using either of those functions in trinket allows the user to type their response directly into the output, as it is with regular python.

Is this an option within skulpt, or is trinket using a modified version of skulpt?

Brad Miller

unread,
May 14, 2016, 2:59:07 PM5/14/16
to sku...@googlegroups.com

Skulpt makes it pretty easy to customize how you handle input by configuring a Javascript function that input will call behind the scenes to get the user input.

You can do this by setting Sk.inputfun to your own custom function.

Brad



-- 
Brad Miller
Professor, Dept. Head, Computer Science, Luther College


On May 14, 2016 at 10:55:40 AM, Timmy Chen (timmy....@gmail.com) wrote:

Using input() or raw_input() in skulpt.org will bring up a javascript prompt() box, yet using either of those functions in trinket allows the user to type their response directly into the output, as it is with regular python.

Is this an option within skulpt, or is trinket using a modified version of skulpt?
--

---
You received this message because you are subscribed to the Google Groups "Skulpt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skulpt+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages