摘要:
#!/usr/bin/env python# -*- coding: utf-8 -*-import os dir = "/var/www/html/EnjoyWeekend/" if os.path.isdir(dir): print('%s is a dir' % dir)else: print 阅读全文
posted @ 2019-12-06 19:31
尤达uuu
阅读(387)
评论(0)
推荐(0)
摘要:
一.os模块概述 python中的os 模块包含普遍的操作系统功能,这个模块不受平台限制,即windows和linux上都适用。 二.常用方法 1.os.name 返回正在使用的平台。如果是windows则用‘nt’表示,对于linux/unix用户则用'posix'表示。 2. os.getcwd 阅读全文
posted @ 2019-12-06 19:26
尤达uuu
阅读(3062)
评论(0)
推荐(0)
浙公网安备 33010602011771号