Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: mosfet on January 13, 2006, 06:12:08 pm

Title: Python support
Post by: mosfet on January 13, 2006, 06:12:08 pm
Hi,

would like to know if you have planned to support script language and in particular python.
I really like this IDE
Title: Re: Python support
Post by: thomas on January 13, 2006, 06:14:24 pm
We have not planned support for python or any other scripting language.

However, Code::Blocks already supports AngelScript for several months now. :)
Title: Re: Python support
Post by: takeshimiya on January 13, 2006, 11:33:24 pm
However, I think we should encourage people (maybe writting in the bounties forum) to add support for other languages.
Title: Re: Python support
Post by: sethjackson on January 14, 2006, 03:13:52 am
However, I think we should encourage people (maybe writting in the bounties forum) to add support for other languages.

Yeah I agree. Next question..... How do you add support for a new language?
Title: Re: Python support
Post by: mosfet on January 14, 2006, 02:07:01 pm
I am not an expert but I don't think it's too difficult to add support for Perl, Pyrhon or Ryby.
Basically you call the interpreter (instead of the compiler) with a list of file.
C::B is well designed and it's rather modular ... At least I hope



However, I think we should encourage people (maybe writting in the bounties forum) to add support for other languages.

Yeah I agree. Next question..... How do you add support for a new language?
Title: Re: Python support
Post by: Michael on January 14, 2006, 05:50:57 pm
Yeah I agree. Next question..... How do you add support for a new language?

I think that this C::B wiki article (http://wiki.codeblocks.org/index.php?title=Installing_Fortran_Compiler) and this topic (http://forums.codeblocks.org/index.php?topic=1436.0) could be of some help.

Michael
Title: Re: Python support
Post by: thomas on January 15, 2006, 12:29:11 am
However, I think we should encourage people (maybe writting in the bounties forum) to add support for other languages.
I don't think so. The "Bounties" forum is for things we absolutely need, and yet another scripting language is no such thing.
First, the actual need for scripting is over-estimated (we have a working implementation for 4 months now, and nobody uses it).
Second, the Angelscript engine has a lot of advantages over Perl, Python, or whatever other script language we could use (to name just a few of many: security, ease of use, integration, speed, lack of external dependencies).

Basically you call the interpreter (instead of the compiler) with a list of file.
How can that be used, for example, to add files to a project, to insert text into the editor, or to start a build process? I agree that it is really simple to run a script in an external interpreter, but integrating it into the IDE is a wholly different matter.
Title: Re: Python support
Post by: Urxae on January 15, 2006, 01:06:17 am
There seems to be some confusion here about what kind of support was requested: support for scripting C::B itself, or support for editing, "compiling" and running programs written in scripting languages from C::B.
I'm guessing the OP meant one or the other, not both. In the light of his second post I'd assume the latter, but I'm not entirely sure.
Title: Re: Python support
Post by: takeshimiya on January 15, 2006, 01:13:33 am
There seems to be some confusion here about what kind of support was requested: support for scripting C::B itself, or support for editing, "compiling" and running programs written in scripting languages from C::B.
I'm guessing the OP meant one or the other, not both. In the light of his second post I'd assume the latter, but I'm not entirely sure.
Of course I'm referring to support for "editing" and "compiling" and "running" programs, and I think mosfet was talking about that.

Not for scripting C::B itself, in which AngelScript fits perfectly. Perhaps the reason nobody is using that yet, is that C::B doesn't provide examples at least of using AngelScript in it.

But I repeat, here we're talking about supporting more languages in the IDE, not for scripting C::B itself.
Title: Re: Python support
Post by: thomas on January 15, 2006, 01:31:17 am
Oh...
Well, if that is all you want, then it is quite trivial, really. You could just run the interpreter as a tool, and use the current editor variable, for example. That needs (almost) zero setup.

Or you might just do like you were adding a new compiler, as pointed out by Michael. Should not take more than a few minutes.

I discourage going for a more complicated solution (a dedicated compiler/interpreter plugin), since very likely that would result in a lot of your work becoming obsolete in a couple of weeks.