
Lv.1
就喜欢苹果
在 联机咋做? 中回复
云变量同步,比如ax是a玩家的x坐标,比如ay是a玩家的y坐标,比如bx是b玩家的x坐标,比如by是b玩家的y坐标,最后把信息上传到两个普通列表里,然后同时移动就OK了
2024-01-28T22:35:49 点赞:1
在 【Python作品分享】《飞机大战》(半成品)【作品秀】 中回复
不管咋样我觉得你这是网上的,因为只有博主才会写这种东西:
#coding:utf-8
谁会专门去提醒txt改后缀py要用utf-8
2024-01-28T23:24:58 点赞:0
在 冬令营&用苹果电脑的人看过来 中回复
报错信息:3189 WARNING: Cannot find path /Users/breezelin/temp/lib/libcrypto.1.0.0.dylib (needed by /Applications/海龟编辑器.app/Contents/Resources/app/python/lib/python3.6/lib-dynload/_hashlib.cpython-36m-darwin.so)
3189 WARNING: Cannot find path /Users/breezelin/temp/lib/libssl.1.0.0.dylib (needed by /Applications/海龟编辑器.app/Contents/Resources/app/python/lib/python3.6/lib-dynload/_hashlib.cpython-36m-darwin.so)
3205 WARNING: Cannot find path @executable_path/../lib/libcrypto.1.0.0.dylib (needed by /Applications/海龟编辑器.app/Contents/Resources/app/python/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so)
3205 WARNING: Cannot find path @executable_path/../lib/libssl.1.0.0.dylib (needed by /Applications/海龟编辑器.app/Contents/Resources/app/python/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so)
3221 INFO: Looking for eggs
3221 INFO: Python library not in binary dependencies. Doing additional searching...
Traceback (most recent call last):
File "/Users/zonghongyu/Downloads/4.1-我的创意游戏/666.py", line 10, in <module>
"-y",
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/__main__.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/__main__.py", line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 803, in main
build(specfile, distpath, workpath, clean_build)
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 725, in build
exec(code, spec_namespace)
File "/Users/zonghongyu/Downloads/4.1-我的创意游戏/ 走格子小游戏.spec", line 19, in <module>
noarchive=False)
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 277, in __init__
self.__postinit__()
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 155, in __postinit__
self.assemble()
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 512, in assemble
self._check_python_library(self.binaries)
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 616, in _check_python_library
python_lib = bindepend.get_python_library_path()
File "/Users/zonghongyu/.wood/ppg-octopus-default-macos-external/lib/python3.6/site-packages/PyInstaller/depend/bindepend.py", line 928, in get_python_library_path
raise IOError(msg)
OSError: Python library not found: Python3, .Python, libpython3.6.dylib, libpython3.6m.dylib, Python
This means your Python installation does not come with proper shared library files.
This usually happens due to missing development package, or unsuitable build parameters of the Python installation.
* On Debian/Ubuntu, you need to install Python development packages:
* apt-get install python3-dev
* apt-get install python-dev
* If you are building Python by yourself, rebuild with `--enable-shared` (or, `--enable-framework` on macOS).
2024-01-29T19:46:56 点赞:0
在 兄弟们,兄弟们,python新论坛!!! 中回复
一共有2次IP地址变更,将第7行绿色部分改为192.168.31.171,从明天15:00开始开启24h不间断服务
2024-01-30T23:29:58 点赞:0
在 python聊天室更新啦 中回复
import os
import uuid
import time
import threading
from socket import *
from tkinter import *
serverName = '喵'#服务器外网IP
serverPort = 6551
root = Tk()
root.title('聊天室')
text = Text(root,width = 100,height = 20)
scroll = Scrollbar(root)
scroll.pack(side = RIGHT,fill = Y)
scroll.config(command = text.yview)
text.config(yscrollcommand = scroll.set)
text.pack()
entry = Entry(root,bd = 5,width = 70)
entry.pack(side = LEFT)
entry2 = Entry(root,bd = 5,width = 20)
clientSocket = socket(AF_INET, SOCK_STREAM)
print('正在连接...')
clientSocket.connect((serverName,serverPort))
print('连接成功!')
msg = clientSocket.recv(2048)#先接收历史记录
if msg.decode() != 'NO_MESSAGE':#有历史记录时
text.insert(END,msg.decode() + '\n----以上是历史记录----\n')
text.see(END)
def get_mac_address():#由于用户名可以随时换,用MAC地址作为标识了
mac = uuid.UUID(int = uuid.getnode()).hex[-12:]
return ':'.join([mac[e:e+2] for e in range(0,11,2)])
def timemark():
timestamp = int(time.time())
timestr = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(timestamp))
return '[' + timestr + ']'
def send():
if entry2.get().replace(' ','') == '':
text.config(state = 'normal')
text.insert(END,'请输入用户名!\n')
text.see(END)
text.config(state = 'disabled')
return
if entry.get() == '':
text.config(state = 'normal')
text.insert(END,'发送内容不能为空!\n')
text.see(END)
text.config(state = 'disabled')
else:
clientSocket.send((timemark() + ' ' + get_mac_address() + ' - ' +
entry2.get() + '\n ' + entry.get()).encode())
entry.delete(0,'end')
button = Button(root,text = 'SEND',command = send)
button.pack(side = RIGHT)
entry2.pack(side = RIGHT)
class myThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
while True:
msg = clientSocket.recv(2048)
text.config(state = 'normal')
text.insert(END,msg.decode() + '\n')
text.see(END)
text.config(state = 'disabled')
textThread = myThread()
textThread.start()
root.mainloop()2024-01-30T23:58:15 点赞:0