<s>
Pyrex	B-Application
is	O
a	O
programming	O
language	O
for	O
creating	O
Python	B-Language
modules	B-Architecture
.	O
</s>
<s>
Its	O
syntax	O
is	O
very	O
close	O
to	O
Python	B-Language
and	O
it	O
makes	O
it	O
easy	O
for	O
Python	B-Language
programmers	O
to	O
write	O
non-Python	O
supporting	O
code	O
for	O
interfacing	O
modules	B-Architecture
in	O
a	O
language	O
which	O
is	O
as	O
close	O
to	O
Python	B-Language
as	O
possible	O
.	O
</s>
<s>
Python	B-Language
itself	O
only	O
provides	O
a	O
C	B-Language
API	B-Application
to	O
write	O
extension	O
modules	B-Architecture
,	O
which	O
allows	O
writing	O
of	O
functions	O
and	O
datatypes	O
in	O
C	B-Language
.	O
These	O
can	O
then	O
be	O
accessed	O
from	O
Python	B-Language
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
wrap	O
the	O
functions	O
and	O
datatypes	O
of	O
existing	O
C	B-Language
libraries	B-Library
as	O
Python	B-Language
objects	O
and	O
therefore	O
make	O
them	O
available	O
to	O
Python	B-Language
.	O
</s>
<s>
Pyrex	B-Application
allows	O
the	O
user	O
to	O
write	O
extension	O
modules	B-Architecture
in	O
a	O
Python-like	O
language	O
which	O
may	O
directly	O
access	O
the	O
external	O
C	B-Language
code	O
.	O
</s>
<s>
The	O
similarity	O
of	O
Pyrex	B-Application
's	O
syntax	O
to	O
Python	B-Language
's	O
makes	O
it	O
easy	O
to	O
write	O
Python	B-Language
modules	B-Architecture
,	O
but	O
there	O
are	O
some	O
functional	O
limitations	O
.	O
</s>
<s>
The	O
programmer	O
must	O
specify	O
the	O
name	O
of	O
C-header	O
files	O
,	O
enumerations	B-Language
,	O
datatypes	O
and	O
functions	O
needing	O
to	O
be	O
accessed	O
in	O
the	O
module	B-Architecture
,	O
then	O
they	O
can	O
be	O
used	O
as	O
if	O
they	O
were	O
Python	B-Language
objects	O
.	O
</s>
<s>
The	O
Pyrex	B-Application
compiler	O
will	O
generate	O
the	O
necessary	O
glue	O
code	O
automatically	O
and	O
compile	O
the	O
Pyrex	B-Application
code	O
into	O
a	O
working	O
Python	B-Language
module	B-Architecture
.	O
</s>
<s>
There	O
are	O
tools	O
like	O
SWIG	B-Application
or	O
Python	B-Language
's	O
foreign	O
function	B-Library
library	I-Library
ctypes	O
which	O
can	O
be	O
used	O
for	O
this	O
task	O
without	O
requiring	O
much	O
additional	O
code	O
,	O
but	O
this	O
is	O
limited	O
to	O
making	O
an	O
external	O
library	O
available	O
in	O
Python	B-Language
code	I-Language
.	O
</s>
<s>
If	O
adjustments	O
to	O
the	O
API	B-Application
are	O
needed	O
,	O
glue	O
code	O
must	O
again	O
be	O
written	O
manually	O
.	O
</s>
