As the title says. If there is anyway to get it on can you please reply to this post? I really need it! Thanks.
Python is not built into Code::Blocks, and there is no easy way of getting it built into it. Code::Blocks uses Squirrel as application scripting language.
However, you can trivially just install Python aside of Code::Blocks (of course without any bindings within the Code::Blocks application).
I have it already installed, but i just wanted to use code::blocks with it because of how you open a new window when you run the program and it can get irritating sometimes.
SImple answer:
no.
C::B is an IDE with no builtin languages.
If you mean, whether there is a plugin that supports python, then the answer is yes as far as I know.
But not in trunk and therefore not installed by default.
Please can you send me the link, I REALLY NEED IT. Plus i want to get used to Code::Blocks for when i start to learn C++. :)
I do not have a link, search the wen and/or the forum.
But i's a plugin to develop python applications, not to use python as scripting-engine for C::B, this is not easily possible as thomas wrote.
It really depends which of the two things you want.
If you want to develop Python scripts in Code::Blocks, you can do that, although it is not primarily designed for that purpose. Still, you can edit source code and organize source files in a project just fine, and you can launch python.exe either as tool or with a (relatively simple) compiler plugin, instead of running a compiler. Maybe such a plugin already exists, too.
If you want to use Python scripting within Code::Blocks, the answer is simply: bad luck for you.
Here are the plugins for python/scripting languages: http://developer.berlios.de/projects/cbilplugin/
Our fellow dmoore works on them.
But be prepared to compile C++ code.
sous Windows, you can also write for example:
#include <Python.h>
int main()
{
Py_Initialize();
PyRun_SimpleString (//"# This Python file uses the following encoding: utf-8\n"
"# -*- coding: iso-8859-1 -*-\n"
"import serial\n"
"from serial.tools import list_ports\n"
"listeport=list_ports.comports()\n"
"print 'Hardware serial ports :'\n"
"n=0\n"
"for tu in listeport:\n"
" print n, tu\n"
" n+=1\n"
"import serialenum\n"
"listeport=serialenum.enumerate()\n"
"print 'All serial ports :'\n"
"n=0\n"
"for tu in listeport:\n"
" print n, tu\n"
" n+=1\n"
"\n"
);
Py_Finalize();
return 0;
}
and compile with gcc, gives exe file.