鱼C论坛

 找回密码
 立即注册
查看: 7558|回复: 36

[吹水] 重启python聊天室

[复制链接]
发表于 2023-1-25 19:45:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 Mike_python小 于 2023-1-26 08:03 编辑

过年了,有压岁钱了 买个服务器重启聊天室

请使用一下客户端登入:
Windows:
  1. from tkinter import *
  2. from tkinter.font import Font
  3. # from tkinter.ttk import *
  4. from tkinter import messagebox as mg
  5. import time
  6. import threading
  7. import socket

  8. def center_window(root, width, height):
  9.     """
  10.     窗口居中代码
  11.     """
  12.     screenwidth = root.winfo_screenwidth()  # 获取显示屏宽度
  13.     screenheight = root.winfo_screenheight()  # 获取显示屏高度
  14.     size = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)  # 设置窗口居中参数
  15.     root.geometry(size)  # 让窗口居中显示

  16. def fasong(*args):
  17.     time.sleep(0.1)
  18.     # re_data = input(">>")
  19.     re_data = send_entry.get("1.0", END)[:-1]
  20.     if 'exit' == re_data:   # 判断是否退出
  21.         client.send(("Q "+ username).encode())  # 发送退出的请求
  22.         client.close()

  23.     elif (re_data != " \n" and re_data != "\n" and re_data != "" and re_data != " "):    # 判断内容不为空
  24.         client.send(("C " + username + ": " + re_data).encode())
  25.         time_ = time.strftime('%Y-%m-%d %H:%M:%S')                  # 以下为自己说的话

  26.         chat_text.config(state=NORMAL)

  27.         #f1 = Font("微软雅黑", 8)
  28.         chat_text.tag_config("tag_3", font=("微软雅黑", 9), foreground="grey")
  29.         chat_text.insert(END, time_, "tag_3")   # 发送时间
  30.         chat_text.insert(END, "\n")

  31.         #f = Font("微软雅黑", 13)
  32.         chat_text.tag_config("tag_41", font=("微软雅黑", 14), foreground="#808080")
  33.         chat_text.insert(END, username + ":", "tag_41")    # 发送文本内容
  34.         chat_text.insert(END, "\n")
  35.         
  36.         #f = Font("微软雅黑", 12)
  37.         chat_text.tag_config("tag_4", font=("微软雅黑", 13), foreground="#2E8B57")
  38.         chat_text.insert(END, re_data, "tag_4")    # 发送文本内容
  39.         chat_text.insert(END, "\n")

  40.         chat_text.config(state=DISABLED)
  41.         chat_text.see("end")    # 转到最后一行


  42.         # send_entry.first()
  43.         # send_entry.delete(0.1,2.0)      # 设置发送为空
  44.         # send_entry.insert('1 wordstart' , "s")
  45.         # time.sleep(0.1)
  46.         send_entry.delete("0.0", END)   # 设置发送为空


  47. def fa_(*args):
  48.     fasong()
  49.     # send_entry.delete("0.0", END)   # 设置发送为空
  50.     return 'break'




  51. def jieshou():
  52.     while True:
  53.         # time.sleep(0.3)
  54.         try:
  55.             data = client.recv(1024)
  56.             res = data.decode()
  57.             if(res != ''):

  58.                 # print("1")
  59.                 if (res.split(" ", 2)[0]=="C"): # 如果为聊天的请求
  60.                     # print(res.split(" ", 1)[0])
  61.                     # print(res.split(" ", 1)[1])
  62.                     # print(res)
  63.                     time_ = time.strftime('%Y-%m-%d %H:%M:%S')

  64.                     chat_text.config(state=NORMAL)

  65.                     #f1 = Font("微软雅黑", 10)
  66.                     chat_text.tag_config("tag_1", font=("微软雅黑", 9), foreground="grey")   
  67.                     chat_text.insert(END, time_, "tag_1")
  68.                     chat_text.insert(END, "\n")

  69.                     #f = Font("微软雅黑", 13)
  70.                     chat_text.tag_config("tag", font=("微软雅黑", 14), foreground="#808080")
  71.                     chat_text.insert(END, res.split(" ", 2)[1], "tag")
  72.                     chat_text.insert(END, "\n")
  73.                     
  74.                    #f = Font("微软雅黑", 12)
  75.                     chat_text.tag_config("tag_2", font=("微软雅黑", 13))
  76.                     chat_text.insert(END, res.split(" ", 2)[2], "tag_2")
  77.                     chat_text.insert(END, "\n")

  78.                     chat_text.config(state=DISABLED)
  79.                     chat_text.see("end")


  80.                 elif(res.split(" ", 1)[0]=="R"):    # 在线用户请求
  81.                     afd = False
  82.                     print(res.split(" ", 1)[1])
  83.                     for kk in range(0, online_user.size()): # 循环判断在线列表里是否有用户名
  84.                         if online_user.get(kk) == (res.split(" ", 1)[1]):   # 检测到是
  85.                             afd = True  # 判断变量为真
  86.                             break   # 退出
  87.                     if (afd ==  False): # 如果判断变量为假
  88.                         online_user.insert(END,res.split(" ", 1)[1])    # 插入用户名


  89.                 elif(res.split(" ", 1)[0]=="E"):    # 退出请求
  90.                     for kk in range(0, online_user.size()): # 循环判断要删除的用户名
  91.                         if online_user.get(kk) == (res.split(" ", 1)[1]):   
  92.                             online_user.delete(kk)  # 从在线列表去除
  93.                             break
  94.                         


  95.         # else:
  96.         #     continue
  97.         except Exception as e:  
  98.             print(e)
  99.             print("客户端已退出")
  100.             #break

  101. def send():
  102.     """
  103.     发送文字
  104.     """
  105.     global username
  106.     username = username_string.get()    # 用户名变量
  107.     # time.sleep(3)


  108.     if __name__ == "__main__":
  109.         # print("Welcome to Gouzi WD Chat")
  110.         # print(username)
  111.         #注册业务
  112.         while True:
  113.             # username=input("请输入用户名")
  114.             if ' ' not in username and username != " " and username != "":  # 判断用户名不为空
  115.                 client.send(("R "+username + " " + password_string.get()+"\n").encode())   # 发送注册请求
  116.                 data=client.recv(2048).decode() # 最大接受字节

  117.                 if data=="OK":  # 如果穿回信息为 “OK”
  118.                     break
  119.             else:
  120.                 mg.showerror("", "用户名不能为空,请强制退出后重新进入")    # 用户名如果为空,发出警告
  121.                


  122.         try:
  123.             # 创建一个新的线程
  124.             new_thread = threading.Thread(target=jieshou, name="T1")   
  125.             # 启动新线程
  126.             new_thread.start()


  127.             new_thread1 = threading.Thread(target=fasong, name="T2")
  128.             # 启动新线程
  129.             new_thread1.start()
  130.         except:
  131.             client.close()

  132. def insert_newline(*args):
  133.     send_entry.insert("insert", "\n")
  134.     return "break"





  135. def main():
  136.     """
  137.     加入聊天后界面
  138.     """
  139.     global chat_text, send_msg, online_user, send_entry
  140.     root = Toplevel()
  141.     root.title("聊天界面")
  142.     center_window(root, 800, 500)

  143.     send_msg = StringVar()


  144.     """
  145.     ——————————————————————————
  146.     查收文件text开始
  147.     """

  148.     frame = Frame(root)
  149.     frame.place(x = 20, y = 20)

  150.     gun_song_tiao_y = Scrollbar(frame)
  151.     gun_song_tiao_x = Scrollbar(frame, orient=HORIZONTAL)

  152.     chat_text = Text(frame, height=14, width=50, wrap='none', relief=GROOVE, state=DISABLED, font=('微软雅黑', 14))#, state=DISABLED


  153.     gun_song_tiao_y.pack(side=RIGHT,fill=Y)
  154.     gun_song_tiao_x.pack(side=BOTTOM, fill=X)

  155.     chat_text.pack()

  156.     gun_song_tiao_y.config(command=chat_text.yview)
  157.     gun_song_tiao_x.config(command=chat_text.xview)

  158.     chat_text.config(yscrollcommand=gun_song_tiao_y.set)
  159.     chat_text.config(xscrollcommand=gun_song_tiao_x.set)

  160.     """
  161.     查收文件区域text结束
  162.     ——————————————————————————
  163.     """



  164.     send_entry = Text(root, width=70, height=6) # 发送区域
  165.     send_entry.place(x=20, y=390)


  166.     send_button = Button(root, text="发送", command=fa_)     # 发送按钮
  167.     send_button.place(x=520, y=390)

  168.     send_entry.bind("<Return>", fa_)
  169.     send_entry.bind("<Control-Return>", insert_newline)

  170.     Label(root, text="在线列表", font=("微软雅黑", 18)).place(x=600, y=20)

  171.     online_user = Listbox(root, height=20)
  172.     online_user.place(x=600, y=50)
  173.     # online_user.insert(END, username_string.get())


  174. def help():
  175.     """
  176.     帮助界面
  177.     """
  178.     mg.showerror("暂无", "NONE")

  179. def if_login(*args):
  180.     main()
  181.     send()

  182. def if_res():
  183.     pass



  184. def login():
  185.     """注册/登陆"""
  186.     global username_string
  187.     global username_string, password_string
  188.     global client

  189.     root = Tk()
  190.     center_window(root, 400, 300)   # 实现页面居中
  191.     root.title("Gouzi WD在线聊天室")    # 标题

  192.     client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  193.     client.connect(('119.3.215.140', 80))

  194.     username_string = StringVar()   # 存储用户名变量
  195.     password_string = StringVar()   # 密码存储变量

  196.     Label(root, text="登陆界面", font=("微软雅黑", 20)).place(x=130, y=30)  # 表头


  197.     Label(root, text="用户名:", font=("微软雅黑", 14)).place(x=10, y=100)  # 用户名一栏
  198.     username = Entry(root, textvariable=username_string)    #用户名Entry
  199.     username.place(x=110, y=100)

  200.     Label(root, text="密码:", font=("微软雅黑", 14)).place(x=10, y=150)  # 密码一栏
  201.     password = Entry(root, textvariable=password_string)    # 密码Entry
  202.     password.place(x=110, y=150)

  203.     username.bind("<Return>", if_login)
  204.     password.bind("<Return>", if_login)



  205.     join_button = Button(root, text="登陆", command=if_login, font=("微软雅黑", 12))    # 进入聊天界面按钮
  206.     join_button.place(x=60, y=200)

  207.     res_button = Button(root, text="注册", command=if_res, font=("微软雅黑", 12))    # 注册
  208.     res_button.place(x=230, y=200)

  209.     # if_login()


  210.     root.mainloop()

  211. login()





  212. # def login():
  213. #     """
  214. #     登陆界面,也是初始界面
  215. #     """
  216. #     root = Tk()
  217. #     center_window(root, 400, 500)   # 实现页面居中
  218. #     root.title("Gouzi WD在线聊天室")    # 标题

  219. #     username_string = StringVar()   # 存储用户名变量
  220. #     ip_string = StringVar() # ip存储变量
  221. #     password_string = StringVar()   # 密码存储变量

  222. #     Label(root, text="初始界面", font=("微软雅黑", 20)).place(x=130, y=30)  # 表头


  223. #     Label(root, text="用户名:", font=("微软雅黑", 14)).place(x=10, y=100)  # 用户名一栏
  224. #     username = Entry(root, textvariable=username_string)    #用户名Entry
  225. #     username.place(x=110, y=100)

  226. #     Label(root, text="ip:", font=("微软雅黑", 14)).place(x=10, y=150)  # ip一栏
  227. #     ip = Entry(root, textvariable=ip_string)    #ipEntry
  228. #     ip.place(x=110, y=150)

  229. #     Label(root, text="ip密码(选填):", font=("微软雅黑", 14)).place(x=10, y=200)  # 密码一栏
  230. #     password = Entry(root, textvariable=password_string)    # 密码Entry
  231. #     password.place(x=110, y=200)

  232. #     Label(root, text="预留位:", font=("微软雅黑", 14)).place(x=10, y=250)  # 预留一栏
  233. #     password = Entry(root)    # 预留Entry
  234. #     password.place(x=110, y=250)

  235. #     join_button = Button(root, text="进入", command=join, font=("微软雅黑", 12))    # 进入聊天界面按钮
  236. #     join_button.place(x=160, y=300)

  237. #     help_button = Button(root, text="帮助", font=("微软雅黑", 9), command=help)   # 帮助按钮
  238. #     help_button.place(x=163, y=350)
  239. #     # join()

  240. #     root.mainloop()
复制代码


Mac版本:
  1. from tkinter import *
  2. from tkinter.font import Font
  3. # from tkinter.ttk import *
  4. from tkinter import messagebox as mg
  5. import time
  6. import threading
  7. import socket
  8. # from socket import SIO_KEEPALIVE_VALS

  9. def center_window(root, width, height):
  10.     """
  11.     窗口居中代码
  12.     """
  13.     screenwidth = root.winfo_screenwidth()  # 获取显示屏宽度
  14.     screenheight = root.winfo_screenheight()  # 获取显示屏高度
  15.     size = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)  # 设置窗口居中参数
  16.     root.geometry(size)  # 让窗口居中显示

  17. def fasong(*args):
  18.     time.sleep(0.1)
  19.     # re_data = input(">>")
  20.     re_data = send_entry.get("1.0", END)[:-1]
  21.     if 'exit' == re_data:   # 判断是否退出
  22.         client.send(("Q "+ username).encode())  # 发送退出的请求
  23.         client.close()

  24.     elif (re_data != " \n" and re_data != "\n" and re_data != "" and re_data != " "):    # 判断内容不为空
  25.         client.send(("C " + username + ": " + re_data).encode())
  26.         time_ = time.strftime('%Y-%m-%d %H:%M:%S')                  # 以下为自己说的话

  27.         chat_text.config(state=NORMAL)

  28.         f1 = Font(size=10)
  29.         chat_text.tag_config("tag_3", font=f1, foreground="grey")
  30.         chat_text.insert(END, time_, "tag_3")   # 发送时间
  31.         chat_text.insert(END, "\n")

  32.         f = Font(size=15)
  33.         chat_text.tag_config("tag_41", font=f, foreground="#808080")
  34.         chat_text.insert(END, username + ":", "tag_41")    # 发送文本内容
  35.         chat_text.insert(END, "\n")
  36.         
  37.         f = Font(size=14)
  38.         chat_text.tag_config("tag_4", font=f, foreground="#2E8B57")
  39.         chat_text.insert(END, re_data, "tag_4")    # 发送文本内容
  40.         chat_text.insert(END, "\n")

  41.         chat_text.config(state=DISABLED)
  42.         chat_text.see("end")    # 转到最后一行


  43.         # send_entry.first()
  44.         # send_entry.delete(0.1,2.0)      # 设置发送为空
  45.         # send_entry.insert('1 wordstart' , "s")
  46.         # time.sleep(0.1)
  47.         send_entry.delete("0.0", END)   # 设置发送为空


  48. def fa_(*args):
  49.     fasong()
  50.     # send_entry.delete("0.0", END)   # 设置发送为空
  51.     return 'break'




  52. def jieshou():
  53.     while True:
  54.         # time.sleep(0.3)
  55.         try:
  56.             data = client.recv(1024)
  57.             res = data.decode()
  58.             if(res != ''):

  59.                 # print("1")
  60.                 if (res.split(" ", 2)[0]=="C"): # 如果为聊天的请求
  61.                     # print(res.split(" ", 1)[0])
  62.                     # print(res.split(" ", 1)[1])
  63.                     # print(res)
  64.                     time_ = time.strftime('%Y-%m-%d %H:%M:%S')

  65.                     chat_text.config(state=NORMAL)

  66.                     f1 = Font(size=10)
  67.                     chat_text.tag_config("tag_1", font=f1, foreground="grey")   
  68.                     chat_text.insert(END, time_, "tag_1")
  69.                     chat_text.insert(END, "\n")

  70.                     f = Font(size=15)
  71.                     chat_text.tag_config("tag", font=f, foreground="#808080")
  72.                     chat_text.insert(END, res.split(" ", 2)[1], "tag")
  73.                     chat_text.insert(END, "\n")
  74.                     
  75.                     f = Font(size=14)
  76.                     chat_text.tag_config("tag_2", font=f)
  77.                     chat_text.insert(END, res.split(" ", 2)[2], "tag_2")
  78.                     chat_text.insert(END, "\n")

  79.                     chat_text.config(state=DISABLED)
  80.                     chat_text.see("end")


  81.                 elif(res.split(" ", 1)[0]=="R"):    # 在线用户请求
  82.                     afd = False
  83.                     print(res.split(" ", 1)[1])
  84.                     for kk in range(0, online_user.size()): # 循环判断在线列表里是否有用户名
  85.                         if online_user.get(kk) == (res.split(" ", 1)[1]):   # 检测到是
  86.                             afd = True  # 判断变量为真
  87.                             break   # 退出
  88.                     if (afd ==  False): # 如果判断变量为假
  89.                         online_user.insert(END,res.split(" ", 1)[1])    # 插入用户名


  90.                 elif(res.split(" ", 1)[0]=="E"):    # 退出请求
  91.                     for kk in range(0, online_user.size()): # 循环判断要删除的用户名
  92.                         if online_user.get(kk) == (res.split(" ", 1)[1]):   
  93.                             online_user.delete(kk)  # 从在线列表去除
  94.                             break
  95.                         


  96.         # else:
  97.         #     continue
  98.         except Exception as e:  
  99.             print(e)
  100.             print("客户端已退出")
  101.             #break

  102. def send():
  103.     """
  104.     发送文字
  105.     """
  106.     global username
  107.     username = username_string.get()    # 用户名变量
  108.     # time.sleep(3)


  109.     if __name__ == "__main__":
  110.         # print("Welcome to Gouzi WD Chat")
  111.         # print(username)
  112.         #注册业务
  113.         while True:
  114.             # username=input("请输入用户名")
  115.             if ' ' not in username and username != " " and username != "":  # 判断用户名不为空
  116.                 client.send(("R "+username + " " + password_string.get()+"\n").encode())   # 发送注册请求
  117.                 data=client.recv(2048).decode() # 最大接受字节

  118.                 if data=="OK":  # 如果穿回信息为 “OK”
  119.                     break
  120.             else:
  121.                 mg.showerror("", "用户名不能为空,请强制退出后重新进入")    # 用户名如果为空,发出警告
  122.                


  123.         try:
  124.             # 创建一个新的线程
  125.             new_thread = threading.Thread(target=jieshou, name="T1")   
  126.             # 启动新线程
  127.             new_thread.start()


  128.             new_thread1 = threading.Thread(target=fasong, name="T2")
  129.             # 启动新线程
  130.             new_thread1.start()
  131.         except:
  132.             client.close()

  133. def insert_newline(*args):
  134.     send_entry.insert("insert", "\n")
  135.     return "break"





  136. def main():
  137.     """
  138.     加入聊天后界面
  139.     """
  140.     global chat_text, send_msg, online_user, send_entry
  141.     root = Toplevel()
  142.     root.title("聊天界面")
  143.     center_window(root, 800, 500)

  144.     send_msg = StringVar()


  145.     """
  146.     ——————————————————————————
  147.     查收文件text开始
  148.     """

  149.     frame = Frame(root)
  150.     frame.place(x = 20, y = 20)

  151.     gun_song_tiao_y = Scrollbar(frame)
  152.     gun_song_tiao_x = Scrollbar(frame, orient=HORIZONTAL)

  153.     chat_text = Text(frame, height=20, width=60, wrap='none', relief=GROOVE, state=DISABLED, font=('微软雅黑', 14))#, state=DISABLED


  154.     gun_song_tiao_y.pack(side=RIGHT,fill=Y)
  155.     gun_song_tiao_x.pack(side=BOTTOM, fill=X)

  156.     chat_text.pack()

  157.     gun_song_tiao_y.config(command=chat_text.yview)
  158.     gun_song_tiao_x.config(command=chat_text.xview)

  159.     chat_text.config(yscrollcommand=gun_song_tiao_y.set)
  160.     chat_text.config(xscrollcommand=gun_song_tiao_x.set)

  161.     """
  162.     查收文件区域text结束
  163.     ——————————————————————————
  164.     """



  165.     send_entry = Text(root, width=70, height=6) # 发送区域
  166.     send_entry.place(x=20, y=390)


  167.     send_button = Button(root, text="发送", command=fa_)     # 发送按钮
  168.     send_button.place(x=520, y=390)

  169.     send_entry.bind("<Return>", fa_)
  170.     send_entry.bind("<Control-Return>", insert_newline)

  171.     Label(root, text="在线列表", font=("微软雅黑", 18)).place(x=600, y=20)

  172.     online_user = Listbox(root, height=25)
  173.     online_user.place(x=600, y=50)
  174.     # online_user.insert(END, username_string.get())


  175. def help():
  176.     """
  177.     帮助界面
  178.     """
  179.     mg.showerror("暂无", "NONE")

  180. def if_login(*args):
  181.     main()
  182.     send()

  183. def if_res():
  184.     pass



  185. def login():
  186.     """注册/登陆"""
  187.     global username_string
  188.     global username_string, password_string
  189.     global client

  190.     root = Tk()
  191.     center_window(root, 400, 300)   # 实现页面居中
  192.     root.title("Gouzi WD在线聊天室")    # 标题

  193.     client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  194.     client.connect(('119.3.215.140', 80))
  195.     # client.setsockopt(socket.SOL_SOCKET, socket.SOCK_STREAM, True)    # windows写法
  196.     # client.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 60*1000, 30*1000))    # windows写法
  197.     client.setsockopt(socket.SOL_SOCKET,socket.SO_KEEPALIVE,True)

  198.     #self.my_socket.ioctl(SIO_KEEPALIVE_VALS,(1,10000,1000))

  199.     client.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPALIVE, 10)#

  200.     client.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 3)

  201.     client.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 5)

  202.     username_string = StringVar()   # 存储用户名变量
  203.     password_string = StringVar()   # 密码存储变量

  204.     Label(root, text="登陆界面", font=("微软雅黑", 20)).place(x=130, y=30)  # 表头


  205.     Label(root, text="用户名:", font=("微软雅黑", 14)).place(x=10, y=100)  # 用户名一栏
  206.     username = Entry(root, textvariable=username_string)    #用户名Entry
  207.     username.place(x=110, y=100)

  208.     Label(root, text="密码:", font=("微软雅黑", 14)).place(x=10, y=150)  # 密码一栏
  209.     password = Entry(root, textvariable=password_string, show="*")    # 密码Entry
  210.     password.place(x=110, y=150)

  211.     username.bind("<Return>", if_login)
  212.     password.bind("<Return>", if_login)



  213.     join_button = Button(root, text="登陆", command=if_login, font=("微软雅黑", 12))    # 进入聊天界面按钮
  214.     join_button.place(x=60, y=200)

  215.     res_button = Button(root, text="注册", command=if_res, font=("微软雅黑", 12))    # 注册
  216.     res_button.place(x=230, y=200)

  217.     # if_login()


  218.     root.mainloop()

  219. login()





  220. # def login():
  221. #     """
  222. #     登陆界面,也是初始界面
  223. #     """
  224. #     root = Tk()
  225. #     center_window(root, 400, 500)   # 实现页面居中
  226. #     root.title("Gouzi WD在线聊天室")    # 标题

  227. #     username_string = StringVar()   # 存储用户名变量
  228. #     ip_string = StringVar() # ip存储变量
  229. #     password_string = StringVar()   # 密码存储变量

  230. #     Label(root, text="初始界面", font=("微软雅黑", 20)).place(x=130, y=30)  # 表头


  231. #     Label(root, text="用户名:", font=("微软雅黑", 14)).place(x=10, y=100)  # 用户名一栏
  232. #     username = Entry(root, textvariable=username_string)    #用户名Entry
  233. #     username.place(x=110, y=100)

  234. #     Label(root, text="ip:", font=("微软雅黑", 14)).place(x=10, y=150)  # ip一栏
  235. #     ip = Entry(root, textvariable=ip_string)    #ipEntry
  236. #     ip.place(x=110, y=150)

  237. #     Label(root, text="ip密码(选填):", font=("微软雅黑", 14)).place(x=10, y=200)  # 密码一栏
  238. #     password = Entry(root, textvariable=password_string)    # 密码Entry
  239. #     password.place(x=110, y=200)

  240. #     Label(root, text="预留位:", font=("微软雅黑", 14)).place(x=10, y=250)  # 预留一栏
  241. #     password = Entry(root)    # 预留Entry
  242. #     password.place(x=110, y=250)

  243. #     join_button = Button(root, text="进入", command=join, font=("微软雅黑", 12))    # 进入聊天界面按钮
  244. #     join_button.place(x=160, y=300)

  245. #     help_button = Button(root, text="帮助", font=("微软雅黑", 9), command=help)   # 帮助按钮
  246. #     help_button.place(x=163, y=350)
  247. #     # join()

  248. #     root.mainloop()
复制代码

评分

参与人数 3荣誉 +5 鱼币 +6 贡献 +6 收起 理由
liuhongrun2022 + 5 + 5 + 3 鱼C有你更精彩^_^
sfqxx + 3 666
学习编程中的Ben + 1

查看全部评分

本帖被以下淘专辑推荐:

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2023-1-25 19:50:51 | 显示全部楼层
现已开启,可使用原密码登陆
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 0 反对 1

使用道具 举报

发表于 2023-1-25 19:55:00 | 显示全部楼层
本帖为密码帖 ,请输入密码 
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 20:01:23 | 显示全部楼层

回帖奖励 +2 鱼币

yeah!!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-1-25 20:09:52 | 显示全部楼层
有Bug!
捕获.PNG

评分

参与人数 2荣誉 +5 鱼币 +6 收起 理由
MIke_python小小 + 1 + 1 感谢反馈!
Mike_python小 + 4 + 5 感谢反馈!

查看全部评分

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 0 反对 1

使用道具 举报

发表于 2023-1-25 20:12:26 | 显示全部楼层

回帖奖励 +4 鱼币

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-1-25 20:17:09 | 显示全部楼层
登录写成了登陆
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-25 20:18:25 | 显示全部楼层
tommyyu 发表于 2023-1-25 20:17
登录写成了登陆

反馈到“反馈贴”
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 21:02:44 | 显示全部楼层
支持
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-1-25 21:04:24 | 显示全部楼层
[password=123456789]你是怎么破解的[/password]
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 21:05:04 | 显示全部楼层
本帖最后由 sfqxx 于 2023-1-25 21:07 编辑

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-1-25 21:06:54 | 显示全部楼层
运行到哪里?@Mike_python小
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-25 21:08:53 | 显示全部楼层
sfqxx 发表于 2023-1-25 21:06
运行到哪里?@Mike_python小

什么叫运行到哪里
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

发表于 2023-1-25 21:09:28 | 显示全部楼层


就是我怎么使用
怎么登录,聊天
(中奖绝缘体)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-25 21:11:56 | 显示全部楼层
sfqxx 发表于 2023-1-25 21:09
就是我怎么使用
怎么登录,聊天
(中奖绝缘体)

先去我的帖子下评分注册,然后运行这个文件啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-25 21:18:04 | 显示全部楼层
sfqxx 发表于 2023-1-25 21:09
就是我怎么使用
怎么登录,聊天
(中奖绝缘体)

不是哥们,看我之前的帖子,有个python聊天室注册的,然后在那里评分5玉璧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 21:19:01 | 显示全部楼层

回帖奖励 +4 鱼币

Mike_python小 发表于 2023-1-25 21:18
不是哥们,看我之前的帖子,有个python聊天室注册的,然后在那里评分5玉璧

6
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 21:19:53 | 显示全部楼层
Mike_python小 发表于 2023-1-25 21:18
不是哥们,看我之前的帖子,有个python聊天室注册的,然后在那里评分5玉璧

找不到,麻烦把地址告诉我
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-25 21:23:37 | 显示全部楼层
sfqxx 发表于 2023-1-25 21:19
找不到,麻烦把地址告诉我


没时间,自己找,去专辑里找也行
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-25 21:27:15 | 显示全部楼层
Mike_python小 发表于 2023-1-25 21:23
没时间,自己找,去专辑里找也行

那个专辑
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-24 07:07

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表