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

推薦閱讀
- Mobile Application Development:JavaScript Frameworks
- 架構(gòu)不再難(全5冊)
- .NET 4.0面向?qū)ο缶幊搪劊夯A(chǔ)篇
- 數(shù)據(jù)結(jié)構(gòu)習(xí)題精解(C語言實現(xiàn)+微課視頻)
- aelf區(qū)塊鏈應(yīng)用架構(gòu)指南
- Java Web基礎(chǔ)與實例教程
- Python高效開發(fā)實戰(zhàn):Django、Tornado、Flask、Twisted(第3版)
- Python時間序列預(yù)測
- Clojure Reactive Programming
- Python 3.7從入門到精通(視頻教學(xué)版)
- Windows Phone 8 Game Development
- C++程序設(shè)計教程(第2版)
- Android移動應(yīng)用開發(fā)項目教程
- Mastering OAuth 2.0
- JavaScript Concurrency