随笔分类 -  python

和python有关的代码
摘要:main.py import sys import time import pygame from pygame.locals import * import blocks SIZE = 30 # 每个小方格大小 BLOCK_HEIGHT = 25 # 游戏区高度 BLOCK_WIDTH = 10 阅读全文
posted @ 2022-06-14 20:23 小染`` 阅读(149) 评论(0) 推荐(0)
摘要:"""贪吃蛇""" import random import sys import time import pygame from pygame.locals import * from collections import deque SCREEN_WIDTH = 600 # 屏幕宽度 SCREE 阅读全文
posted @ 2022-06-14 20:21 小染`` 阅读(47) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2022-06-09 14:50 小染`` 阅读(4) 评论(0) 推荐(0)
摘要:python 聊天室client代码import socket import threading people_name = '' people_send = '' #101.34.212.195 def client_send(sock): global people_name global people_send while Tr 阅读全文
posted @ 2022-05-27 18:46 小染`` 阅读(71) 评论(0) 推荐(0)
摘要:python统计文件夹下不同文件的数量和大小import os wjzd={} wjsize={} lj="wjcl/src/test" def get_size_type(f_path): global lj files_name = os.listdir(f_path) for name in files_name: file_path 阅读全文
posted @ 2022-05-26 22:37 小染`` 阅读(407) 评论(0) 推荐(0)
摘要:python 文件分类import os import shutil wj={"图片":".jpeg.jpg.png.jfif","文档":".txt.docx.pdf.gitkeep","音乐":".mp3.wav","影像":".mp4.flv"} lj1="wjcl/src/test2" lj="wjcl/src/ 阅读全文
posted @ 2022-05-26 22:30 小染`` 阅读(107) 评论(0) 推荐(0)