Re: [Tutor] Embedding Python

2007-02-26 Thread Dave Kuhlman
On Sun, Feb 25, 2007 at 01:35:52PM -0800, Dj Gilcrease wrote: > On 2/25/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > > If you have not already, you will want to look at SWIG > > (http://www.swig.org/). SWIG will generate C or C++ code from a > > header file containing structs and classes and func

Re: [Tutor] Embedding Python

2007-02-25 Thread Dj Gilcrease
On 2/25/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > If you have not already, you will want to look at SWIG > (http://www.swig.org/). SWIG will generate C or C++ code from a > header file containing structs and classes and function > declarations. That generated code can then be compiled and lin

Re: [Tutor] Embedding Python

2007-02-25 Thread Dave Kuhlman
On Sat, Feb 24, 2007 at 02:50:41AM -0800, Dj Gilcrease wrote: > I am attempting to embed Python in a C++ app and have a question > before I get too far into it. > > Is is possible to to dynamically create an extension module? > eg, I want a module name spam and I have a stuct that contains all my

Re: [Tutor] Embedding strings in a python script

2007-01-04 Thread Kent Johnson
Tony Cappellini wrote: > What I'd like to know, is there a way I can embed/endcode the cvs string > above in the python script, so that when that script is modified and > checked into cvs, that the cvs header string above will not be modified > by cvs? Try using \x24 instead of $: cvs_header='

Re: [Tutor] Embedding strings in a python script

2007-01-03 Thread Tony Cappellini
Message: 5 Date: Thu, 4 Jan 2007 16:13:51 +1300 From: "John Fouhy" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Embedding strings in a python script To: tutor-python Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 04/

Re: [Tutor] Embedding strings in a python script

2007-01-03 Thread John Fouhy
On 04/01/07, Tony Cappellini <[EMAIL PROTECTED]> wrote: > What I'd like to know, is there a way I can embed/endcode the cvs string > above in the python script, so that when that script is modified and checked > into cvs, that the cvs header string above will not be modified by cvs? What about thi

Re: [Tutor] embedding lists in configuration files

2006-10-12 Thread Alan Gauld
> Python program instead of hard-coded values. The configuration data > currently is in the form of a couple of lists and some triple-quoted > strings. > > I was looking at the ConfigParser module, but I cannot see how to > use > this format to represent lists or triple-quoted strings. Are there

Re: [Tutor] embedding lists in configuration files

2006-10-12 Thread Kent Johnson
William O'Higgins Witteman wrote: > I am looking for a way to use a plain text configuration file in a > Python program instead of hard-coded values. The configuration data > currently is in the form of a couple of lists and some triple-quoted > strings. > > I was looking at the ConfigParser modu

Re: [Tutor] embedding lists in configuration files

2006-10-12 Thread Luke Paireepinart
William O'Higgins Witteman wrote: > I am looking for a way to use a plain text configuration file in a > Python program instead of hard-coded values. The configuration data > currently is in the form of a couple of lists and some triple-quoted > strings. > > I was looking at the ConfigParser modul

Re: [Tutor] embedding python

2006-10-09 Thread Alan Gauld
> know a little html not much i can make a page with backround coler a > title > words and pictures as well as links > > but i cant find any tutorials on embedding python useing html i > found some > that use c++ and i think one that used asp Can you give an example of what you mean by *embeddin

Re: [Tutor] embedding python

2006-10-08 Thread Luke Paireepinart
max . wrote: > hello i have a myspace and a blog both of wich allow me to input html and i > know a little html not much i can make a page with backround coler a title > words and pictures as well as links > > but i cant find any tutorials on embedding python useing html i found some > that use

Re: [Tutor] Embedding

2005-10-05 Thread Kent Johnson
You might be interested in this article about making a game in a week using Python and Pygame: http://www.gamedev.net/reference/articles/article2259.asp Joseph Quigley wrote: > Hi, > Ok, I'll try to convince them to try python... but still, would it be > best to just: > Program in C with Python

Re: [Tutor] Embedding

2005-09-28 Thread Kent Johnson
Joseph Quigley wrote: > Hi, > Ok, I'll try to convince them to try python... but still, would it be > best to just: > Program in C with Python and Java scripts This seems like a poor choice. Some commercial games have been written with the main game engine in C and Python used to script some gam

Re: [Tutor] Embedding

2005-09-28 Thread Joseph Quigley
Hi, Ok, I'll try to convince them to try python... but still, would it be best to just: Program in C with Python and Java scripts Program in Python with a little bit of C? The game we're trying to make is a Super Mario type game (or super tux for you like linux games). I suppose pygame would mak

Re: [Tutor] Embedding

2005-09-27 Thread Kent Johnson
Michael Sparks wrote: > On Tuesday 27 September 2005 23:16, Kent Johnson wrote: >>Sounds like a bit of a hash to me. Show them pygame and convince them to >>learn Python :-) > > If you tell them to drop the type declarations, braces {}, semicolons, and > make their code a touch simpler, then they

Re: [Tutor] Embedding

2005-09-27 Thread R. Alan Monroe
> Well we are three programmers. I know python, another knows Java and the > other C++. We are trying to figure out how to combine all three > langauges to make a game. I checked out this book from the local library: MUD Game Programming by Ron Penton http://www.amazon.com/exec/obidos/tg/detail/-

Re: [Tutor] Embedding

2005-09-27 Thread Michael Sparks
On Tuesday 27 September 2005 23:16, Kent Johnson wrote: > Joseph Quigley wrote:... > > Well we are three programmers. I know python, another knows Java and the > > other C++. We are trying to figure out how to combine all three > > langauges to make a game. > > Sounds like a bit of a hash to me. Sh

Re: [Tutor] Embedding

2005-09-27 Thread Kent Johnson
Joseph Quigley wrote: >>From: Kent Johnson <[EMAIL PROTECTED]> >>Subject: Re: [Tutor] Embedding >> >>Not easily. You can embed C in Java with JNI. >> > Thanks, that just migh be perfect... or is there a program that will > embedd Java into C/C++? Yes,

Re: [Tutor] Embedding

2005-09-27 Thread Joseph Quigley
>From: Kent Johnson <[EMAIL PROTECTED]> >Subject: Re: [Tutor] Embedding > > >Not easily. You can embed C in Java with JNI. > Thanks, that just migh be perfect... or is there a program that will embedd Java into C/C++? > You can access the result from Jython. But the

Re: [Tutor] Embedding

2005-09-27 Thread Kent Johnson
Joseph Quigley wrote: > hi, > I'm working on a game with other friends who don't use python. However > they'd like to use Java Python and C/C++. I was wondering if I could > embedd C in a Python program in Jython and lastly in java (or the other > way arround). My goal is: Can these for language

RE: [Tutor] embedding python in a C app on a linux box...

2004-12-07 Thread Jason Child
- From: Danny Yoo [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 12:18 PM To: Jason Child Cc: [EMAIL PROTECTED] Subject: Re: [Tutor] embedding python in a C app on a linux box... On Tue, 7 Dec 2004, Jason Child wrote: > Ok, so I have a decent grasp of python and have coded qu

Re: [Tutor] embedding python in a C app on a linux box...

2004-12-07 Thread Danny Yoo
On Tue, 7 Dec 2004, Jason Child wrote: > Ok, so I have a decent grasp of python and have coded quite a few > scripts. I must say that the language rocks. I would like to embed > python into a C app to provide some scripting support. Hi Jason, We have to first mention that most of us here are