Is there an alternative to making educational Java applets for physics simulations like projectile motion, gravity, etc?
Asked
Active
Viewed 1.2k times
10
-
2Do you need them to run in a web browser like an applet? – Nick Jan 09 '12 at 10:20
6 Answers
8
If you want it to run in a browser, you could use PyJamas - which is a Python-to-Javascript compiler and set of tools.
I'm not sure how well it is maintained these days, though.

Eli Bendersky
- 263,248
- 89
- 350
- 412
2
You can run IronPython in Silverlight applications:
http://www.voidspace.org.uk/ironpython/silverlight/index.shtml

Gareth Davis
- 27,701
- 12
- 73
- 106
-
so from all the comments. Can I use pygame to create a physics simulation, then use PySide to add GUI elements and finally IronPython to put it on the web ??? – hershey92 Jan 09 '12 at 15:04
-
yep, that in theory should be fine. One restriction I think you might bump into is that silver light won't allow you to run native CPython extensions. – Gareth Davis Jan 09 '12 at 16:14
-
hey, could you please expand on 'native Cpython' and also present a solution for this problem. This is my first encounter to a python project, thanks a ton. – hershey92 Jan 09 '12 at 20:12
-
2I've just looked at the source for pygame and it contains an awful lot of C code. This isn't unusual in python extensions, but compiling it and convincing Silverlight to load the binary will present a serious issue and may not even be possible. – Gareth Davis Jan 09 '12 at 20:59
1
You can run CPython in the browser using empythoned. There is no proper interface from Python to the browser though, so it will be hard to do any GUI applications.

Janus Troelsen
- 20,267
- 14
- 135
- 196