【发布时间】:2016-01-18 13:15:24
【问题描述】:
我今年 14 岁,请原谅我的 Python 知识。我正在尝试使用这样的 if/else 语句使这个程序仅在我在学校时(在学校的 Wifi 上)运行:
if ontheschoolwifi:
Keep running the program
else:
close the program because im not at school and wont need it
我想知道如何让 python 知道如何获取它所连接的 wifi。 提前感谢您的帮助:)
【问题讨论】:
-
哪个操作系统?编程语言只是语言,但 wifi 是一个硬件接口,通常由操作系统处理,非常松散地说,操作系统负责公开一个应用程序编程接口 (API),其中编写的程序是一种可以用来查询/交互的语言(比如 Python)。
-
@metatoaster 我正在运行 Windows 10。
标签: python python-2.7 module wifi