摘要:
输出: os.stat_result(st_mode=33188, st_ino=7348222, st_dev=16777220, st_nlink=1, st_uid=501, st_gid=20, st_size=198, st_atime=1497418897, st_mtime=14974 阅读全文
posted @ 2017-06-14 22:37
2021年的顺遂平安君
阅读(428)
评论(0)
推荐(0)
摘要:
import os print(os.stat('my_module.py')) 输出: os.stat_result(st_mode=33188, st_ino=7348222, st_dev=16777220, st_nlink=1, st_... 阅读全文
posted @ 2017-06-14 22:37
2021年的顺遂平安君
阅读(93)
评论(0)
推荐(0)
摘要:
import osos.rename('original_name.txt','new_name.txt') 阅读全文
posted @ 2017-06-14 22:32
2021年的顺遂平安君
阅读(75)
评论(0)
推荐(0)
摘要:
```
import os os.rename('original_name.txt','new_name.txt')
``` 阅读全文
posted @ 2017-06-14 22:32
2021年的顺遂平安君
阅读(301)
评论(0)
推荐(0)
摘要:
会自动将 上一级 文件夹也删除, 谨慎使用! 阅读全文
posted @ 2017-06-14 17:28
2021年的顺遂平安君
阅读(630)
评论(0)
推荐(0)
摘要:
import osos.rmdir('OS-Demo-2')os.removedirs('OS-Demo-3/sub-Dir-1') os.removedirs()会自动将上一级文件夹也删除,谨慎使用! 阅读全文
posted @ 2017-06-14 17:28
2021年的顺遂平安君
阅读(59)
评论(0)
推荐(0)
摘要:
import osos.mkdir('OS-Demo-2')os.makedirs('OS-Demo-3/sub-Dir-1') os.mkdir()和os.makedirs()都可以新建文件夹,区别在于,os.makedirs()能自动创建上一级文件... 阅读全文
posted @ 2017-06-14 17:24
2021年的顺遂平安君
阅读(61)
评论(0)
推荐(0)
摘要:
和`os.makedirs() os.makedirs()`能 自动创建上一级文件夹 ,如果不存在的话。 阅读全文
posted @ 2017-06-14 17:24
2021年的顺遂平安君
阅读(1613)
评论(0)
推荐(0)
摘要:
``` import os print(os.getcwd()) 打印当前工作目录 os.chdir('/Users//Desktop/') 将当前工作目录改变为 print(os.listdir()) ``` 阅读全文
posted @ 2017-06-14 17:16
2021年的顺遂平安君
阅读(42403)
评论(0)
推荐(3)
摘要:
import osprint(os.getcwd()) # 打印当前工作目录os.chdir('/Users//Desktop/') # 将当前工作目录改变为`/Users//Desktop/` 以 list 的形式列出当前目录下的文件和目录 prin... 阅读全文
posted @ 2017-06-14 17:16
2021年的顺遂平安君
阅读(39)
评论(0)
推荐(0)
摘要:
打开macOS的Applications文件夹: 双击其中的Font Book: 把下载的字体解压后的_文件夹_ 拖进来,字体就安装好了。 阅读全文
posted @ 2017-06-14 17:02
2021年的顺遂平安君
阅读(86)
评论(0)
推荐(0)
摘要:
打开macOS的 文件夹: 双击其中的 : 把下载的字体解压后的_文件夹_ 拖进来,字体就安装好了。 阅读全文
posted @ 2017-06-14 17:02
2021年的顺遂平安君
阅读(668)
评论(0)
推荐(0)
摘要:
+`Shift 3`: 全屏幕截屏,并自动保存在桌面 +`Shift 4`: 手动截屏,并自动保存在桌面 +`Shift 4`, + , 之后点击程序的窗口,实现窗口截屏,并自动保存在桌面。 上面所有命令如果加上 键,截屏将保存在剪切板而不是以文件的形式保存在桌面。 阅读全文
posted @ 2017-06-14 16:56
2021年的顺遂平安君
阅读(171)
评论(0)
推荐(0)
摘要:
Command+Shift+3: 全屏幕截屏,并自动保存在桌面 Command+Shift+4: 手动截屏,并自动保存在桌面 Command+Shift+4, + Space, 之后点击程序的窗口,实现窗口截屏,并自动保存在桌面。 上面所有命令如... 阅读全文
posted @ 2017-06-14 16:56
2021年的顺遂平安君
阅读(79)
评论(0)
推荐(0)
摘要:
The simplest explanation for the __name__ variable (imho) is the following: Create the following files. # a.pyimport b # b.py... 阅读全文
posted @ 2017-06-14 15:48
2021年的顺遂平安君
阅读(29)
评论(0)
推荐(0)
摘要:
The simplest explanation for the variable (imho) is the following: Create the following files. Running them will get you this output: As you can see, 阅读全文
posted @ 2017-06-14 15:48
2021年的顺遂平安君
阅读(168)
评论(0)
推荐(0)
摘要:
Mounty for Mac 阅读全文
posted @ 2017-06-14 15:26
2021年的顺遂平安君
阅读(365)
评论(0)
推荐(0)
摘要:
Mounty for Mac brew cask install mounty 阅读全文
posted @ 2017-06-14 15:26
2021年的顺遂平安君
阅读(79)
评论(0)
推荐(0)
摘要:
"""import my_module as mmcourses = ['History','Math','Physics','CompSci']index = mm.find_index(courses, 'Math')print (index)""""... 阅读全文
posted @ 2017-06-14 14:08
2021年的顺遂平安君
阅读(56)
评论(0)
推荐(0)
摘要:
```
"""
import my_module as mm courses = ['History','Math','Physics','CompSci'] index = mm.find_index(courses, 'Math')
print (index)
""" """
from my_module import find_index courses = ['History','... 阅读全文
posted @ 2017-06-14 14:08
2021年的顺遂平安君
阅读(250)
评论(0)
推荐(0)
浙公网安备 33010602011771号