All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists matching topic version-check

Recently created
Least recently created
Recently updated
Least recently updated

timmy / 檢查 Python 版本是否受 Streamlit 支援

0 likes
0 forks
1 files
Last active 10 months ago
這段程式碼適合用於開發或部署 Streamlit 應用時,確保運行的 Python 版本符合 Streamlit 的支援範圍,避免因版本不符而導致問題。
automation compatibility-check python streamlit system-compatibility version-check
1 import sys
2
3 class PythonVersionChecker:
4 def __init__(self, supported_versions):
5 self.supported_versions = supported_versions
6
7 def get_current_version(self):
8 """取得當前的 Python 版本。"""
9 return sys.version_info[:2]
Newer Older

Powered by Opengist ⋅ Load: 20ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文