Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is there any way to use Python to replace Flash for in browser animation, gaming, webapps, whatever? Pretty straight-forward IMHO. Does anyone know how to do this?

share|improve this question

closed as too broad by gnat, MichaelT, GlenH7, Snowman, John Jan 8 at 1:25

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
Simple, (1) create your own python based browser plugin, (2) market it heavily to increase market share (3) profit. –  Doug T. Dec 15 '10 at 3:17
    
@pythagras: You make it sound so easy...it's tantalizing. –  John Dec 15 '10 at 3:18
    
This has been asked here stackoverflow.com/questions/1540214/… –  Matthew Read Dec 15 '10 at 3:24
    
@Matt: I didn't think to search SO for this as this question contains no code. –  John Dec 15 '10 at 3:30
    
I figured, that's why I answered anyways :) –  Matthew Read Dec 15 '10 at 3:31

3 Answers 3

up vote 3 down vote accepted

Pythagras' comment is basically accurate. Python is a server-side language, like PHP or C#. Flash is a client-side language like JavaScript. You'd need to create a Python plug-in or translator to use it client-side. Fortunately, someone else already has: check out Skulpt.

share|improve this answer
1  
IIUC Skulpt is an implementation of Python in Javascript, it is not a plug-in. –  Tony Meyer Dec 15 '10 at 4:44
    
Thanks, updated –  Matthew Read Dec 15 '10 at 5:34
1  
@Tony Meyer: Actually, it ought to be pretty simple to translate Skulpt into ActionScript, which means that you could run Python using the Flash plugin, and have all of that platform's features available. Um...So I'm just going to send a quick email to Mr. Graham... –  Jon Purdy Dec 15 '10 at 6:32

You can use IronPython (an implementation of Python on .NET) to create Silverlight applications. Silverlight is a plug-in like Flash, and you can do essentially the same things with it (the installed base is smaller, although no-one really knows exactly what the numbers are).

share|improve this answer

There is Brython, which is a browser-friendly Python(2.7+)-to-JavaScript compiler, written in JavaScript. It works pretty well already and has an active community.

With Brython, you can include your python scripts as simple as:

<script type="text/python"> ... </script>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.