- Daniel Arbuckle's Mastering Python
- Daniel Arbuckle
- 135字
- 2021-07-02 21:09:37
Creating an empty package
The first section of this chapter deals with creating a simple empty package, which won't do anything yet, but by the time we're done, we'll be able to import the empty package into the Python shell.
Simple Python projects may consist of a single code module, but normally there are multiple modules combined together into a package. A package can contain as many modules as we need it to. Packages start their lives as folders on the filesystem, which means we can make them just as we would make any other folder.
If you prefer to use your operating system's file browser to make folders, that's fine, but I usually use the command line. For example let's run a demo package:
$ mkdir demopackage
This is shown as the following screenshot:

推薦閱讀
- Java Web開發學習手冊
- SQL Server 2016從入門到精通(視頻教學超值版)
- Practical Data Science Cookbook(Second Edition)
- Web Development with Django Cookbook
- Java編程技術與項目實戰(第2版)
- SQL Server 2016數據庫應用與開發
- Learning Concurrent Programming in Scala
- Java Fundamentals
- R Data Science Essentials
- Android Sensor Programming By Example
- Learning Kotlin by building Android Applications
- PHP Microservices
- 算法精解:C語言描述
- Microsoft Windows Identity Foundation Cookbook
- Hands-On Data Visualization with Bokeh