Medium syndication metadata

This commit is contained in:
Brandon Rozek 2023-03-10 12:41:04 -05:00
parent c5b2488589
commit 9bf7cfb744
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
14 changed files with 82 additions and 64 deletions

View file

@ -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)
```
```