IPB

Bienvenue invité ( Connexion | Inscription )

[ En ligne ] · Standard · Linéaire+

> Pfouuu, java me fait chier, lĂ  ...

momo
post 09/08/2002 21:50
Message #1


lvl1 male rogue St=1 Dex=5 Int=17 Wi=5 Ch=0
****

Groupe : Modérateurs
Messages : 1,730
Inscrit le : 16/05/2002 23:00
Lieu : .gif
Membre no. 12



.. alors je vais essayer Python ... ça à l'air marrant à premiere vu ...

Ceci est un communiqué sans interet aucun d'un momo qui se desespere de programmer bcp mieux en Basic que dans n'importe quel autre langage


--------------------
Natural evolution insists that we are apes; artificial evolution insists that we are machines with an attitude.
Kevin Kelly - Out of control
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topicStart Poll
Réponse(s)
momo
post 10/08/2002 17:44
Message #2


lvl1 male rogue St=1 Dex=5 Int=17 Wi=5 Ch=0
****

Groupe : Modérateurs
Messages : 1,730
Inscrit le : 16/05/2002 23:00
Lieu : .gif
Membre no. 12



CODE

from Tkinter import *

def Clear_button():
z.delete(1.0,END)


def Code_button():
output=""
text=z.get(1.0,END)
for x in range(len(text)-1):
test=str(text[x])
if test>="a" and test<="z":
carval=ord(test)+13
if carval>ord("z"):
carval=ord("a")+carval%ord("z")-1
output=output+chr(carval)
elif test>="A" and test<="Z":
carval=ord(test)+13
if carval>ord("Z"):
carval=ord("A")+carval%ord("Z")-1
output=output+chr(carval)
else:
output=output+test
z.delete(1.0,END)
z.insert(END,output)



root = Tk()

w = Button(root, text="Code",command=Code_button)
w.grid(row=0,column=0)
a = Button(root, text="Clear",command=Clear_button)
a.grid(row=1,column=0)
z=Text(root,font="Times_New_Roman 10",wrap=WORD)

z.grid(row=2,column=1)

root.mainloop()

on avance assez vite en python ...
ça c'est le genre de langage qui me plait : rapide, simple et efficace ...
et surtout : il y a "print" !!! wink.gif


--------------------
Natural evolution insists that we are apes; artificial evolution insists that we are machines with an attitude.
Kevin Kelly - Out of control
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
momo   Pfouuu, java me fait chier, lĂ  ...   09/08/2002 21:50
Darhf   alors un petit article pour toi qui date une peu v...   09/08/2002 22:06
momo   je le relis +/- regulierement ... :)   09/08/2002 22:15
Poischack   arf moi j'ai fait l'inverse python -> java......   09/08/2002 23:30
momo   from Tkinter import * def Clear_button(...   10/08/2002 17:44
Gfx   Rah Python rulez !!!!   10/08/2002 17:44
momo   ben ça :)   10/08/2002 17:45
momo   m'enfin quand on voit ce que supporte ce langage, ...   10/08/2002 17:52
Poischack   tu peux toujours utilisĂ© py2exe, il te fait des e...   10/08/2002 17:57
momo   dwd en cours .. done on verra ça Ă  tĂȘte repos...   10/08/2002 18:03
Poischack   c vrai que elif plus que plus cool que else if ....   10/08/2002 18:20
momo   sans compter qu'il est sacrement rapide : je vou...   11/08/2002 8:53
momo   from Tkinter import * def Clear_bton(...   11/08/2002 15:13
momo   tiens, j'y pense, y a pas moyen de mettre une colo...   11/08/2002 15:15
Poischack   nan et c'est bete, sinon ton prog marche, c'est ...   11/08/2002 15:33
momo   PostĂ© le: Dim AoĂ»t 11, 2002 3:13 pm : "bon, i...   11/08/2002 20:01
Poischack   oula va peut etre falloir que je change de lunette...   11/08/2002 20:03
momo   m'enfin en attendant, "impr. Ecran" et paint font ...   11/08/2002 20:11
Gfx   Y'a des trucs mortels en Python momo, lit mes arti...   11/08/2002 23:36
Poischack   heu .... moi je prefere mes prog qui tiennent su...   11/08/2002 23:38
Gfx   Oui mais c beau techniquement :))) J'ai aussi Ă...   12/08/2002 0:13
Gfx   Au fait, jette un oeil aux gĂ©nĂ©rateurs. Et plutĂ...   12/08/2002 0:20
Gfx   Au fait momo, tu peux compiler le Python sous form...   12/08/2002 1:13
momo   ben le tinker, je l'utilise uniquement parceque tk...   12/08/2002 9:52
momo   tĂ©lĂ©chargement de pyQT : Done tĂ©lĂ©chargement...   12/08/2002 12:53
Gfx   momo, tu as juste besoin de la DLL de QT, qui ne f...   12/08/2002 13:39
momo   bon, de toutes façon, j'ai presque terminĂ© le te...   12/08/2002 13:44
momo   bon voilĂ , done ....   12/08/2002 14:02
momo   localisation spatio-temporelle: Terre, 14/08/2002 ...   14/08/2002 20:59
Poischack   Microsoft, relation publique: pschht pschhtt momo...   14/08/2002 21:15
Gfx   Installe l'extension PIL. Ca rulez pour traiter le...   14/08/2002 21:43
momo   ce serait trop facile du coup ...   14/08/2002 21:46
Poischack   :) pff pourquoi faire facil quan don peut faire co...   14/08/2002 21:51
momo   et pourquoi ne pas develloper sa propre librairie ...   15/08/2002 10:53
momo   from Tkinter import * def Dwords(files...   16/08/2002 10:24


Reply to this topicTopic OptionsStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :
 

Version bas débit Nous sommes le : : 04/07/2025 16:51