Hello everyone.

I'm new to this list so let me introduce myself. I'm Jordi from Spain.
I'm a newbie to Python coming from other programming languages. Of
course, I'm a newbie to pyglet too.

I love python interactive console but not being able to use pyglet
from there is very annoying, because I think it's a great library. I
don't want to use threads, and that was the only thing I could found,
until I saw code.InteractiveConsole and then decided to program a
python/pyglet interactive console.

I have a working version. Now it's possible to do almost anything one
can do from python console, but always inside pyglet event loop, so
it's possible to create new windows, attach handlers, draw in the
background of the console text and so on.

The only thing changed from pyglet library has been in the event_loop.
First I decided to write my own event loop but I thought pyglet's
event loop was already done, so it was a waste of time. So I adapted
pyglet event loop extracting everything from the loop to a iterate()
function so I can call from elsewhere.

I would love to share it with everyone but I don't know how to attach
a file here or uploading. It's only three files, the console.py
script, and the modified win32.py and xlib.py from pyglet.app (they
are more adaptations than modifications, because it's only copy/paste
to create two new functions, pre_run() and iterate(), run() then calls
them)

I hope this is interesting to someone, because I'm sure there will be
problems using this console with existing scripts. But I think it's a
good idea and I'm very interested in hearing every suggestion/critics
to it.

Jordi P. Bou



-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to