0

I'm currently developing a web application where the primary function is Python's Turtle. When I started doing this I used Skulpt to be able to visualize and run my python code on the website, and it worked great. However, I need to give my python code an input from a form in the HTML-file. So I tried using Splinter for that problem, but it did not work, it seems as though the Python code stopped running when I wrote "from splinter import browser".

Does anyone know if Splinter is not compatible with Skulpt or if there is another way I may go about to do this?

Elias
  • 53
  • 1
  • 9

1 Answers1

0

splinter is not implemented in skulpt. You can write it yourself. Take a look at "Third Party Modules" on http://www.skulpt.org/

Another way is to change "input()":

Sk.configure({
        inputfun: function (prompt) {
           return window.prompt(prompt);
        },
});

Here is an interesting post about change the input Wait for an event to occur within a function in Javascript for Skulpt

Coupido
  • 151
  • 7
  • Thanks! However, after some thought I think I will be trying out Brython as it seems easier to work with DOM API and such. – Elias Feb 12 '19 at 10:02