cheat_sheets_python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cheat_sheets_python [2023/01/18 00:56] – [Files: Reading From] gman | cheat_sheets_python [2023/01/18 01:24] (current) – [Main Block] gman | ||
---|---|---|---|
Line 26: | Line 26: | ||
===== Virtual Environment ===== | ===== Virtual Environment ===== | ||
- | Create a new virtual environment for // | + | Create a new virtual environment for // |
- | * Virtual environments allow you to keep all your project' | + | * This way the dependencies of each project are isolated from the system and from the other projects |
* There are no limits to the number of environments you can have since they are just directories containing a few scripts. | * There are no limits to the number of environments you can have since they are just directories containing a few scripts. | ||
- | **Installation: | + | **Installation: |
**Create a Virtual Environment: | **Create a Virtual Environment: | ||
Line 120: | Line 120: | ||
---- | ---- | ||
- | ===== Check: File Load ===== | + | ===== Main Block ===== |
- | Runs main() if file was not imported: | + | Runs '' |
< | < | ||
Line 129: | Line 129: | ||
</ | </ | ||
- | ---- | + | By including this '' |
+ | | ||
+ | | ||
+ | * Since '' | ||
+ | * This means everything else in your imported program (functions, classes, etc.) is available to you, but the main block will //**not**// be executed. Pretty slick |
cheat_sheets_python.1674003386.txt.gz · Last modified: by gman