I met various mini-games online, they were somehow published there.
I have a program written in Python and having a GUI interface. Is it possible to also publish it somehow by creating your own website?
Can Django help me with this?
I met various mini-games online, they were somehow published there.
I have a program written in Python and having a GUI interface. Is it possible to also publish it somehow by creating your own website?
Can Django help me with this?
One way or another, a complete rewrite is required .
Is it possible to also publish it somehow by creating your own website?
No (if this means the ability to play directly in the browser) . The “GUI interface” in browsers is built on web pages. But only. You can write your own HTML GUI control logic in JavaScript or another language that compiles to JavaScript.
Theoretically, there is a Python interpreter on JS, but you don’t want to use it for serious tasks. And even if you arm them, you still have to rewrite the entire GUI, because browsers have completely different APIs.
Can Django help me with this?
No Django about the server part, the code of which the client part does not execute itself, but only makes requests to the one who actually executes it: to the server.
Requests go through some data transfer protocol. Moreover, in order to fully replace the interaction with the GUI, the protocol for exchange between the server and the client must be full duplex , that is, support transmission on the initiative of any of the parties. HTTP is not.
Such is, for example, WebSocket, with the setting of which in Django, as far as I know, certain adventures are connected. Although they can be overcome, and for some games the full-duplex protocol is not even needed ... there is a rather high probability that after removing the client code from your game, the rest will still have to be rewritten.
Of course, there is always the opportunity to simply publish the source code of the game, which everyone can run on their machine outside the browser, but because of the obviousness of the option, I did not even consider it.
Source: https://ru.stackoverflow.com/questions/563463/
All Articles