This chapter and the next take a quick look at program execution—how you launch code, and how Python runs it. In this chapter, we’ll study how the Python interpreter executes programs in general. Chapter 3 will then show you how to get your own programs up and running. Startup details are inherently platform-specific, and some of the material in these two chapters may not apply to the platform you work on, so more advanced readers should feel free to skip parts not relevant to their intended use. Likewise, readers who have used similar tools in the past and prefer to get to the meat of the language quickly may want to file some of these chapters away as “for future reference.” For the rest of us, let’s take a brief look at the way that Python will run our code, before we learn how to write it.
时间: 2024-02-14 10:03:53 浏览: 67
本章和下一章将快速浏览程序执行 - 如何启动代码以及Python如何运行它。在本章中,我们将研究Python解释器如何一般执行程序。第三章将向您展示如何运行您自己的程序。启动详细信息固有地依赖于特定平台,这两章中的一些材料可能不适用于您所使用的平台,因此更高级的读者应随意跳过与其预期使用无关的部分。同样,过去使用过类似工具并希望快速了解语言核心的读者可能希望将一些章节存为“供将来参考”。对于我们其他人来说,在学习如何编写代码之前,让我们简要了解Python将如何运行我们的代码。
阅读全文