[pygame] Loading commands from a file

2007-07-26 Thread Ian Mallett
Hi, I'd like to know how to load commands from a file. In the file (in this case a .txt) there would be commands like glBegin(GL_QUADS). I would like to load these commands into a program so that the commands can be executed. Previously, I had been selecting all in the .txt file and pasting all

Re: [pygame] Is pygame-ctypes dead?

2007-07-26 Thread Luke Paireepinart
[EMAIL PROTECTED] wrote: Hi, I wonder what happened to the pygame-ctypes project lately. Is the development just stalled because of not enough time or did the author loose the interest in it? Some rumors I heard in #pygame were that the author was pretty disappointed of the rather hot

[pygame] Is pygame-ctypes dead?

2007-07-26 Thread mva
Hi, I wonder what happened to the pygame-ctypes project lately. Is the development just stalled because of not enough time or did the author loose the interest in it? Some rumors I heard in #pygame were that the author was pretty disappointed of the rather hot discussion we had some time

Re: [pygame] Is pygame-ctypes dead?

2007-07-26 Thread Brian Fisher
Alex Holkner posted a message about pygame-ctypes in December 06, that ended with this: The result of the pygame-users discussion a few months ago was that Pygame-ctypes development would effectively be stopped, as there was little support for it developing in place of Pygame(C). If there is

Re: [pygame] Loading commands from a file

2007-07-26 Thread Dave LeCompte (really)
Ian Mallett [EMAIL PROTECTED] wrote: I'd like to know how to load commands from a file. In the file (in this case a .txt) there would be commands like glBegin(GL_QUADS). I would like to load these commands into a program so that the commands can be executed. Previously, I had been

Re: [pygame] Loading commands from a file

2007-07-26 Thread Ian Mallett
I think this is what I need! Thank you, once again. Ian

Re: [pygame] Loading commands from a file

2007-07-26 Thread Brian Fisher
I'm curious - so why are these commands in a .txt file? what is the application of this in the context of a game? (I'm thinking maybe somebody knows a better way to accomplish your goal, as opposed to simply answering a technical python question) On 7/26/07, Ian Mallett [EMAIL PROTECTED] wrote:

Re: [pygame] Loading commands from a file

2007-07-26 Thread Ian Mallett
On 7/26/07, Brian Fisher [EMAIL PROTECTED] wrote: I'm curious - so why are these commands in a .txt file? what is the application of this in the context of a game? (I'm thinking maybe somebody knows a better way to accomplish your goal, as opposed to simply answering a technical python

Re: [pygame] Loading commands from a file

2007-07-26 Thread Michael George
I'm not sure if this is exactly what you want, but there's an exec command that takes a file object and interprets it as a python script. I think there are also variants that take a file name, and there might also be variants to run the file in a sandbox. --Mike Ian Mallett wrote: Hi, I'd

Re: [pygame] Loading commands from a file

2007-07-26 Thread Toni Alatalo
Ian Mallett kirjoitti: I'd like to know how to load commands from a file. In the file (in this case a .txt) there would be commands like glBegin(GL_QUADS). I would like to load these commands into a program so that the commands can be executed. Previously, I had been selecting all in the

Re: [pygame] Loading commands from a file

2007-07-26 Thread Brian Fisher
it's a builtin. You can just use it from anywhere FYI, the argument can be either a string of code or an open file object - It can't be a filename (cause how is a filename different from a string?) and I don't believe it has any safe or sandboxed variant right now (though some people are working

Re: [pygame] Loading commands from a file

2007-07-26 Thread Ian Mallett
Sounds like what I want- but where is it? On 7/26/07, Michael George [EMAIL PROTECTED] wrote: I'm not sure if this is exactly what you want, but there's an exec command that takes a file object and interprets it as a python script. I think there are also variants that take a file name, and

Re: [pygame] Int function simplified

2007-07-26 Thread Campbell Barton
Cool, I should have mentioned this same change works for floats. René Dudfield wrote: cool, thanks :) Committed revision 1026. On 7/27/07, Campbell Barton [EMAIL PROTECTED] wrote: Hi, I have been looking into parsing numbers with Blender3D's api and thought Id take a look at how PyGame

Re: [pygame] Int function simplified

2007-07-26 Thread René Dudfield
cool, thanks :) Committed revision 1026. On 7/27/07, Campbell Barton [EMAIL PROTECTED] wrote: Hi, I have been looking into parsing numbers with Blender3D's api and thought Id take a look at how PyGame parses numbers. Even though youd think PyInt_AsLong would only work with PyInt's it

[pygame] Int function simplified

2007-07-26 Thread Campbell Barton
Hi, I have been looking into parsing numbers with Blender3D's api and thought Id take a look at how PyGame parses numbers. Even though youd think PyInt_AsLong would only work with PyInt's it actually converts any type that supports the PyNumber protocol into an in. - so theres no advantage