- Python Essentials
- Steven F. Lott
- 320字
- 2021-07-16 13:53:08
Looking at other Python interpreters
This book will focus on a particular implementation of Python called the CPython. What this means is that Python—the abstract language—can be processed by a variety of concrete Python runtimes or implementations. The CPython implementation is written in portable C and can be recompiled for many operating systems.
Python can be embedded into an application. This means that a complex application can include the entire Python language as a way to write scripts that customize the given application. One example of this is the Ganglia monitoring system (http://ganglia.sourceforge.net). Python is part of the system; we can customize the behavior using Python scripts that will interact with Ganglia components. We won't be looking more deeply into these kinds of applications in this book; we'll focus on standalone implementations of Python.
There are several alternative Python implementations. In the Installing Python on Windows section in this chapter, we noted that Iron Python (http://ironpython.net) and PTVS (http://pytools.codeplex.com) are available. These provide tighter integration with the .NET framework.
There are still more implementations that we might encounter:
- Jython: This is a version of the Python interpreter that is written in Java and runs on the Java Virtual Machine (JVM). See http://www.jython.org. This project focuses on Python 2.7.
- PyPy: This is a version of the Python interpreter written in Python. See http://pypy.org. The circularity of "Python written in Python" is broken by the RPython translation toolchain, which creates a very sophisticated implementation of Python programs. This can provide significant performance improvements for a variety of long-running applications, such as web servers.
- Stackless: This version of Python has a different threading model from CPython. See http://www.stackless.com. This version can provide dramatic performance improvements for multithreaded servers.
Since the Python source is readily available, it's quite easy to look for optimization opportunities. The language is relatively simple, allowing experimentation to see what effect changes in implementation may have.
- C#程序設(shè)計(jì)實(shí)訓(xùn)指導(dǎo)書
- 潮流:UI設(shè)計(jì)必修課
- Linux網(wǎng)絡(luò)程序設(shè)計(jì):基于龍芯平臺(tái)
- C語(yǔ)言程序設(shè)計(jì)
- Linux命令行與shell腳本編程大全(第4版)
- C語(yǔ)言程序設(shè)計(jì)
- Learning Apache Karaf
- Android開發(fā)三劍客:UML、模式與測(cè)試
- Clean Code in C#
- Hadoop 2.X HDFS源碼剖析
- IPython Interactive Computing and Visualization Cookbook
- Mastering ASP.NET Core 2.0
- Functional Python Programming
- Sitecore Cookbook for Developers
- Android嵌入式系統(tǒng)程序開發(fā)(基于Cortex-A8)