mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-10-10 06:51:13 +00:00
Medium syndication metadata
This commit is contained in:
parent
c5b2488589
commit
9bf7cfb744
14 changed files with 82 additions and 64 deletions
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
title: "Detect Python Version"
|
||||
date: 2021-03-15T18:09:38-04:00
|
||||
date: 2021-03-15 22:09:38
|
||||
draft: false
|
||||
tags: ["Python"]
|
||||
medium_enabled: true
|
||||
medium_post_id: f742be560b7f
|
||||
tags:
|
||||
- Python
|
||||
title: Detect Python Version
|
||||
---
|
||||
|
||||
I was working on a distribution recently where `python` was mapped to `python2`. It mixed me up for a bit since I was writing a script for `python3` but it ran partially under `python2`. To lower confusion in the future, I think it's a great idea to check the python version and exit if it isn't the version you expect.
|
||||
|
@ -20,5 +22,4 @@ if version_info.major != 3:
|
|||
)
|
||||
print("Exiting...")
|
||||
exit(1)
|
||||
```
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue