- 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:

推薦閱讀
- 數(shù)字媒體應(yīng)用教程
- Mastering JavaScript Object-Oriented Programming
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- Mastering phpMyAdmin 3.4 for Effective MySQL Management
- C/C++常用算法手冊(第3版)
- TradeStation交易應(yīng)用實(shí)踐:量化方法構(gòu)建贏家策略(原書第2版)
- C++新經(jīng)典
- Teaching with Google Classroom
- 批調(diào)度與網(wǎng)絡(luò)問題的組合算法
- ElasticSearch Cookbook(Second Edition)
- C# and .NET Core Test Driven Development
- 計算機(jī)應(yīng)用基礎(chǔ)教程(Windows 7+Office 2010)
- Raspberry Pi Robotic Projects(Third Edition)
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級賬本看區(qū)塊鏈架構(gòu)設(shè)計
- PHP與MySQL權(quán)威指南