0

I need to make a very specific program to calculate text RPG results based on user inputs, currently Im making it in Python because thats what I know to use, but we play in a website and most players dont have any program to use Python and some even play on their phones, is there any way to play it on a website?

I've looked for ways and most sources said I need to convert it to HTML or another language like C or C++, but I dont even know how to do this and the auto-converters I've tried didnt worked. Jupyter Notebook also wouldnt work because some of the players doesnt know how to use it and it would be too hard to teach them all.

Is there ANY way to keep it in Python and use it on a website?

6
  • 1
    Make a backend in Python using something like FastAPI, make a UI frontend with JS. Commented Feb 8, 2023 at 18:06
  • There are various web-based python interpreters. See for example link or link Commented Feb 8, 2023 at 18:07
  • Have a look at fullstackpython.com/web-development.html Commented Feb 8, 2023 at 18:09
  • I've heard of people using Python on Glitch.com. Is your code okay being public? You can use appmode or Voila so your non-coding friends don't need to see the Jupyter notebook, and use the Mybinder service to offer temporary sessions. Go to appmode github page on your phone using its browser. Scroll down to where it says 'Try it Live' and click 'launch binder'. You should see a calculator app open on your phone. That is backed by a notebook running on a temporary remote session via the MyBinder service. Voila is fancier & newer but similar. Commented Feb 8, 2023 at 20:34
  • For a Voila example, I'm going to suggest the iexFinder one. Sadly, the link is currently broken on the Voila Gallery page (I submitted a pull request to fix it.) So click the 'Source' text below the tile for now. End up here on your phone and click on the launch binder badge on the bottom (or far right) to open it as an app. Keep in mind they didn't set it up for really bing able to use well on a phone but it should help give you an idea. You can edit the main formula near the top and then hit 'Update'. Scroll to the right to see the fancy plot. Commented Feb 8, 2023 at 21:22

1 Answer 1

1

You can use any python web framework and host it. If you are a beginner, I recommend you to use Flask framework and try hosting it in https://www.pythonanywhere.com/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.