可以在网站中使用Python吗?

huangapple go评论59阅读模式
英文:

Is there a way to use Pyhton in websites?

问题

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?

我需要制作一个非常具体的程序,根据用户输入来计算文本RPG的结果。目前我正在使用Python制作它,因为这是我知道如何使用的,但我们在一个网站上进行游戏,大多数玩家没有任何可以使用Python的程序,甚至有些人在手机上玩,有没有办法在网站上进行游戏?

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.

我已经寻找了方法,大多数来源都说我需要将它转换为HTML或其他语言,比如C或C++,但我甚至不知道如何做到这一点,我尝试过的自动转换器都没有成功。Jupyter Notebook也不适用,因为一些玩家不知道如何使用它,教他们所有人会太困难。

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

有没有任何办法可以保持它在Python中,并在网站上使用它?

英文:

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?

答案1

得分: 1

你可以使用任何Python web框架并进行托管。如果你是初学者,我建议你使用Flask框架,并尝试在https://www.pythonanywhere.com/ 上进行托管。

英文:

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/

huangapple
  • 本文由 发表于 2023年2月9日 02:04:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75389965.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定