Friday, January 25, 2013

Brython trouve son code...

Sur le serveur

Jusqu’à maintenant, en parlant de Brython, j'ai mis l'emphase sur le fait que tout roule du cote du client, dans la page web.

Sur ce blog, par exemple, j'inclus même brython.js a même le gabarit de blogger, pour figer la version. Tout est ici.

Et bien sur, le code Python lui meme se retrouve a l'interieur de la balise script:

<script type="text/python">
#le code python va ici
print("Et pourtant elle tourne")

Mais pourquoi le titre?

C'est pour introduire une nouvelle fonctionnalité de Brython, tout juste sortie du four! On peut maintenant utiliser la syntaxe:

<script type="text/python" src=""></script>

Et le Brython va aller chercher (ou tout autre script python que l'on spécifie) avec un appel ajax, sur le serveur (avec certains navigateurs comme Firefox, en fait meme pas besoin de serveur, on peut faire un file open de la page web et tout fonctionne localement). Sur un serveur, comme c'est avec ajax, bien sur le script se doit d’être sur le même domaine que la page web.

On pourra ainsi séparer notre structure (.html), nos embellissements (.css) et notre logique (.py).


1 comment:

iperdy fumenson said...

Since aficionados view journalists replica cartier watches uk, we now have regularly shown most people using inexpensive selections when traveling were only available in tricky creations, by using possible choices along these lines. However the manner on the holiest from holies not to mention in particular one from your acknowledged together with honest view, contains nevertheless been recently out of the question to most. Made from 5 isolate products starting from a new two-hand computerized to a enjoy and even given in various dial as well as strap variations, this unique cutting edge gallery by and large is usually a gorgeous in addition to welcome reduction via old solutions. We all will unquestionably often be diving in to different models inside gallery in the future not to mention each is impressively valued, moreover, especially currently most people can center on all the special place for the selection, plus express so why when mechanized clock buffs it is advisable to extremely possibly be attending to. Everyone furthermore talk to wristwatches replica breitling uk, along with debate for company place to see the best way to save your pieces wash. Typically the see ended up being the notable watchmaker on the 18th centuries along with an individual term showed up for pocket sized devices in addition to watches in your premature 20th 100 years. This brand name has been resurrected to be a luxury luxurious make and we not too long ago possessed the chance to evaluate numerous timepieces using their gallery. In the event you want an increased ending follow that is not within your general suspects, these are typically well worth a 2nd glimpse. When there seems to be at any time a person quartz view that we include lusted regarding, it does not take pieces. For the reason that her brand implies, a lot of these running watches go with different fahsion signal to figure out his or her setting and they are after that allowed to sync along to be able to possess the highly accurate time no matter where you are. Having said that, you can find what person think a product is usually diluting very typically the observe is a symbol of during a pursuit of bigger market place discuss. Superstar endorsements, unrelated sponsorships as well as endless release situations have taken precedence throughout genuine horological new development, several dispute. Is actually the following a fact? It communications information the two of these opposing sights in a old-school-style discourse wax replica watches. Oahu is the terminate on the 365 days as well as some connected with you may be eyeing an exciting new clock it could be considering that you feel somewhat high through the add-ons you may have just simply compiled, or you desire to memorialize just after possessing a excellent yr. Whatever a motives could be, always remember these sayings from help and advice because of some of our pieces.