函数os.getenv得到“环境变量”的值。以“变量名”作为参数,返回该变量值的字符串:. print(os.getenv("HOME")) --> /home/lua. 如果没有该环境变量则返回nil。
確定! 回上一頁