Will Python (run in a browser) handle an RTS's game window?


If Python can be run in a browser,

Will my RTS client's game window be playable? - how? - browser window? - in its own window?
It looks like printf's are written to the browser window, but will Threading occur normally?
I'll keep my invulnerable RTS server in Java. And do a client in pure Python now. Will it be as good as in Java?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Not sure what you mean with: "Python running in a browser"

Am also not sure what your exact objective is:

You want to write python code, that is running on a client, but you don't want to install python?

You want to have a python client, but be able at the same time to do partial rendering with HTML / javascript?

So please correct me if I'm  not answering to what you're actually interested in.

If you mean the equivalent of Java Applets (Java running in a browser if the java plugin is installed), then no. At least I'm not aware of any native python running within a browser.

A pure python client could use for example Pygame / Gtk / PYQt / PySide or any other frameworks and connect to game servers / web servers.

Some of them allow to instantiate  a browser widget. PyQt  Pyside and PyQtk for example allow you to have a browser window with javascript and full DOM access and you can call python code from javascript.

There is trinket.io which is python in a browser without installing anything locally, but up to my understanding (I'm not 100% sure) the code is saved on trinket.io's web server and the python is actually translated to python. So I think this will not be anything useful  performance wise.

skulpt and brython are also just javascript applications, that translate python to javascript on the fly. So I guess that the performance is reduced and that you will not have access to many python libraries.

Most browser games, that I'm aware of are written in javascript (or close derivatives, that are translated to javascript like typescript / coffeescript) with the help of some javascript framework  and communicate with a server written in any language of your choice (C, Python, Java, ruby, .net, go, nodejs )

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
beavoidAuthor Commented:

Reading the expert answer I received again, please can you select it as the solution and award the points
David Johnson, CD, MVPOwnerCommented:
which is correct you want to award the expert points or you want to delete the question?
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

beavoidAuthor Commented:
gelonida main answer and close normally

Plz put "thanks" as my closing comment
beavoidAuthor Commented:
I need a python browser entity to do pygame well. Is that not a problem?

beavoidAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.