Knowledge

Pyrex (programming language)

Source 📝

217: 415: 188:
Pyrex allows the user to write extension modules in a Python-like language which may directly access the external C code. The similarity of Pyrex's syntax to Python's makes it easy to write Python modules, but there are some functional limitations. The programmer must specify the name of C-header
193:, datatypes and functions needing to be accessed in the module, then they can be used as if they were Python objects. The Pyrex compiler will generate the necessary glue code automatically and compile the Pyrex code into a working Python module. 204:
which can be used for this task without requiring much additional code, but this is limited to making an external library available in Python code. If adjustments to the API are needed, glue code must again be written manually.
163:. Its syntax is very close to Python and it makes it easy for Python programmers to write non-Python supporting code for interfacing modules in a language which is as close to Python as possible. 456: 480: 485: 222: 475: 380: 349: 318: 287: 170: 108: 181:
in C. These can then be accessed from Python. It is possible to wrap the functions and datatypes of existing C
449: 157: 85: 56: 182: 430: 442: 167: 89: 251: 273: 335: 304: 422: 341: 160: 153: 113: 8: 333: 401: 124: 376: 345: 314: 310: 283: 279: 96: 366: 190: 426: 101: 469: 372: 334:
Jang Hyuk Kwon; Thom Dunning; Kum Won Cho; Aurore Savoy-Navarro (2010).
174: 24: 414: 252:"ANN: Pyrex — a language for writing Python extension modules" 178: 230: 185:
as Python objects and therefore make them available to Python.
197: 337:
Future Application and Middleware Technology on E-Science
212: 173:
to write extension modules, which allows writing of
467: 450: 302: 249: 364: 457: 443: 271: 243: 468: 200:or Python's foreign function library 409: 368:Core Python Applications Programming 223:Free and open-source software portal 13: 14: 497: 393: 413: 215: 481:Free compilers and interpreters 358: 327: 296: 265: 166:Python itself only provides a 1: 486:Python (programming language) 250:greg at cosc (3 April 2002). 236: 62:0.9.9 / 12 April 2010 429:. You can help Knowledge by 7: 208: 10: 502: 476:Computer programming stubs 408: 119: 107: 95: 81: 77: 55: 51: 33: 23: 425:-related article is a 303:Alex Martelli (2009). 64:; 14 years ago 39:; 22 years ago 196:There are tools like 423:computer-programming 365:Wesley Chun (2012). 306:Python in a Nutshell 154:programming language 114:Programming language 20: 275:Programming Python 272:Mark Lutz (2006). 18: 438: 437: 147: 146: 37:3 April 2002 493: 459: 452: 445: 417: 410: 405: 404: 402:Official website 387: 386: 362: 356: 355: 331: 325: 324: 300: 294: 293: 282:. p. 1461. 269: 263: 262: 260: 258: 247: 225: 220: 219: 218: 143: 140: 138: 136: 134: 132: 130: 128: 126: 97:Operating system 72: 70: 65: 47: 45: 40: 21: 17: 501: 500: 496: 495: 494: 492: 491: 490: 466: 465: 464: 463: 400: 399: 396: 391: 390: 383: 375:. p. 385. 363: 359: 352: 344:. p. 141. 332: 328: 321: 313:. p. 650. 301: 297: 290: 270: 266: 256: 254: 248: 244: 239: 221: 216: 214: 211: 123: 73: 68: 66: 63: 43: 41: 38: 34:Initial release 12: 11: 5: 499: 489: 488: 483: 478: 462: 461: 454: 447: 439: 436: 435: 418: 407: 406: 395: 394:External links 392: 389: 388: 381: 357: 350: 326: 319: 311:O'Reilly Media 295: 288: 280:O'Reilly Media 264: 241: 240: 238: 235: 234: 233: 227: 226: 210: 207: 145: 144: 121: 117: 116: 111: 105: 104: 102:Cross-platform 99: 93: 92: 83: 79: 78: 75: 74: 61: 59: 57:Stable release 53: 52: 49: 48: 35: 31: 30: 27: 9: 6: 4: 3: 2: 498: 487: 484: 482: 479: 477: 474: 473: 471: 460: 455: 453: 448: 446: 441: 440: 434: 432: 428: 424: 419: 416: 412: 411: 403: 398: 397: 384: 382:9780132678209 378: 374: 373:Prentice Hall 370: 369: 361: 353: 351:9781441917195 347: 343: 339: 338: 330: 322: 320:9781449379100 316: 312: 308: 307: 299: 291: 289:9780596554613 285: 281: 277: 276: 268: 253: 246: 242: 232: 229: 228: 224: 213: 206: 203: 199: 194: 192: 186: 184: 180: 176: 172: 169: 164: 162: 159: 156:for creating 155: 151: 142: 122: 118: 115: 112: 110: 106: 103: 100: 98: 94: 91: 87: 84: 80: 76: 60: 58: 54: 50: 36: 32: 28: 26: 22: 16: 431:expanding it 420: 367: 360: 336: 329: 305: 298: 274: 267: 255:. Retrieved 245: 201: 195: 191:enumerations 187: 165: 149: 148: 25:Developer(s) 15: 342:Springer US 257:24 February 129:.canterbury 470:Categories 237:References 82:Written in 69:2010-04-12 44:2002-04-03 29:Greg Ewing 183:libraries 179:datatypes 175:functions 209:See also 189:files, 161:modules 137:/python 120:Website 67: ( 42: ( 379:  348:  317:  286:  231:Cython 202:ctypes 158:Python 139:/Pyrex 135:/~greg 86:Python 421:This 152:is a 150:Pyrex 127:.cosc 19:Pyrex 427:stub 377:ISBN 346:ISBN 315:ISBN 284:ISBN 259:2014 198:SWIG 177:and 109:Type 171:API 133:.nz 131:.ac 125:www 472:: 371:. 340:. 309:. 278:. 88:, 458:e 451:t 444:v 433:. 385:. 354:. 323:. 292:. 261:. 168:C 141:/ 90:C 71:) 46:)

Index

Developer(s)
Stable release
Python
C
Operating system
Cross-platform
Type
Programming language
www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
programming language
Python
modules
C
API
functions
datatypes
libraries
enumerations
SWIG
Free and open-source software portal
Cython
"ANN: Pyrex — a language for writing Python extension modules"
Programming Python
O'Reilly Media
ISBN
9780596554613
Python in a Nutshell
O'Reilly Media
ISBN
9781449379100

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.