How nice it would be to use Python instead of JavaScript to write browser-based applications. However, JavaScript is the only language that can be executed in a browser (except flash or Silverlight ). Use python to writeCodeAnd then convert it to a Javascript script through the compiler. This is indeed feasible. Well, someone already did this: pyjamas
Pyjamas introduction:
Google's Web Toolkit (GWT) allows us to fully develop rich Internet application (RIA) with Ajax functions using Java code ). You can use a wide range of Java tool sets (IDE, refactoring, Code Completion, debugger, and so on) to develop applications that can be deployed in all mainstream web browsers.Program. With the help of GWT, you can write an application that runs in a browser but is similar to a desktop application.
Similar to GWT, pyjamas is a cross-browser API with which you can use python to write client functions. The advantage of pyjamas is that you can use python to write network programs instead of HTML and JavaScript. You can reuse and import classes and modules. In addition, the Ajax library can solve the problem of interoperability without worrying about the compatibility of the program in IE 6, IE7, Firefox, Safari, opera and other browsers.
Do you think it's cool? Pyjamas has a demo page with multiple effects.
For example:
Mars login game: http://pyjs.org/examples/asteroids/output/Space.html
Mail Client: http://pyjs.org/examples/mail/output/Mail.html
Gwtcanvas: http://pyjs.org/examples/gwtcanvas/output/GWTCanvasDemo.html
(HTML5 canvas ?? Someone has discussed this issue here)
For more information, visit the home page of pyjamas: http://pyjs.org.
I am planning to learn HTML5 recently, but HTML5 is still playing with a bunch of JavaScript. So, it's okay to play with pyjamas first !~