Sunday, January 27, 2013

Utopia Python (ou realidade?)

Utopia


Imagine um mundo onde você pode programar em Python, onde que você quer. Sim, ela existe para iPad, Android, iPhone, PC, Unix, Mac, Linux etc. Mas há uma área ...

Navegadores Web


Seria ótimo se nós não tem que usar Javascript. Nós colocamos na nossa página web, algo como:

<script type="text/python">
def lista(num):
    for i in range(num):
        print(i)

lista(10)
</script>

Ou talvez colocar o nosso código em um arquivo e fazer isso:

<script type="text/python" src="codigo.py"></script>


E ter um bom suporte para HTML5, SVG, eventos, callbacks...
Sim, é genial, sem dúvida. De qualquer forma pode parar de sonhar com uma utopia, o que!

Consola Navegador (Firefox fazer Ctrl-Shift-K, Chrome Ctrl-Shift-J, Safari Ctrl-Alt-I): Este é o código Python que foi executado.

Impossível!

É muito possível, graças Brython:

O que é isso?

Veja esta página ( http://www.brython.info/test/test_clock.html ), o você vai ver um relógio analógico. E o código fonte da página? Sim, é um programa em Python!

Sim, eu sei ... deixa sem palavras ...

@f_dion

P.S. Nós Telecharge brython.js aqui: brython/downloads e como usá-lo (english). Lista Brython em português: forum/brython-pt. Esta semana, vou publicar no meu blog um aplicativo para iPhone escrito com Brython.

1 comment:

Tendaxes Hobisons said...

The unhappy aspect is without a doubt this different watches are usually at the conclusion, expensive different watches. Which means these do include a several cost, the one that is usually out of the grasp of most. This is exactly where looks after are available. Some people seem to properly get any butch manliness belonging to the manufacturer, with a much more than competitive price, together with devoid of getting virtually any concessions on top quality. And the best benefit it is easy to request every timepieces from your comfort of your family family home. A wrist watch is normally just a few click on at a distance. The particular looks after are the appropriate gift idea, whether it is a spouse, a great pal as well as you plan to pay back your own self by using a marvelous watch. That they wonderfully embody the actual philosophy to a expensive view, the variance being very reasonable. When considering 1st birthdays, That i problem after i are trying to find the proper surprise. The option might be a tiny a lot easier whether it is the best friend, mainly because you, adult men, contain usual flavour, ideal? Although as it pertains into choosing a gift to get a lovely lady, It is my job to, in addition to I really do really mean at all times have tangled. I absolutely get tried using to choose the prevalent denominator intended for both men and women. Perhaps a perfume http://www.gavinwatches.co.uk/cartier-roadster-replica-uk.html, or simply when ladies always like to suggest, fragrance, would have been a superior alternative, nonetheless it is quite hazardous to help you option the necessary finances using this. A flavor normally stay everybody when it comes to classy, stylish styles. Designer watches that the affirmation, not just customer happiness is visually, but because of ones own the past, by his or her meaning. And also reveal to us, exactly who helps make some sort of declaration quite as good as some? Your faith is without a doubt unparalleled together with ones own back ground may well confirm that. The best keep an eye on really does an enjoyable job from copying this facet of the real timepiece, simultaneously regarding art plus usefulness. The particular change? There is no need that will hurt your pocket book to acheive the hands for this good sit back and watch.