Last night was using a pyglet for creating some good graphical applications ,it was my first introduction with the pyglet,so just went on pyglet.org and downloaded a pdf file .
Now simply made two programs that is mentioned in the pdf of the pyglet program 1.It is simple program that prints 'HELLO WORLD' program2.It is simple takes the keyboard and mouse events Now I am going to write both the code then regarding queries also. 1.import pyglet window=pyglet.window.Window() lable=pyglet.text.Lable('Hello, world', font_name='Times New Roman', font_size=36, x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='center') *...@window.event * def on_draw(): window.clear() label.draw() pyglet.app.run() okay I just drop second example just tell me why we are using that all the code that is showed in RED color . 2What is Event Handlers as well as What is DECORATORS TELL ME ALSO regards sudhanshu
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor