An open API service indexing awesome lists of open source software.

https://github.com/undertone0809/little_chatroom

A simple chat room test built with Python, socket and pyqt.
https://github.com/undertone0809/little_chatroom

Last synced: 6 months ago
JSON representation

A simple chat room test built with Python, socket and pyqt.

Awesome Lists containing this project

README

        

# Introduction

This is a simple chat room built with Python, socket and Pyqt.

**Feature**
- Provide a server and a client
- The server and the client can send msg to each other.

> This project is further encapsulated on the basis of pyqt, and a new framework is constructed by using the ideas of spring mvc for reference.[【快速调用】基于mvc架构的pyqt架构封装](https://blog.csdn.net/linZinan_/article/details/112460133)

# Usage

- python3.7.6

```shell
pip install PyQt5
```

1.run `ServerApplication.py` first.

2.run `ServerApplication.py`.

> ps:ServerApplication must start up firstly.

- file structure

```shell
│ ClientApplication.py
│ ServerApplication.py
│ README.md

├─controller # page controller
│ │ HomeController.py implement the UI style of home.py
│ │ __init__.py

├─service # socket service encapsulation
│ │ socket_client.py client service encapsulation
│ │ socket_server.py server service encapsulation
│ │ __init__.py

├─static # static resource
│ │ __init__.py
│ │
│ └─images
│ bg1.jpg
│ headPh.png

└─views
│ home.py # Ui files generated by qtdesigner
│ home.ui # qtdesigner generate
│ __init__.py
```

# References

- [Python线程池及其原理和使用(超级详细)](https://blog.csdn.net/weixin_33953249/article/details/93740825?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165458898016781683918204%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165458898016781683918204&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-3-93740825-null-null.142^v11^control,157^v13^new_3&utm_term=python+%E7%BA%BF%E7%A8%8B%E6%B1%A0&spm=1018.2226.3001.4187)

- [python socket编程详细介绍](https://blog.csdn.net/rebelqsp/article/details/22109925?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165462527816782391857934%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=165462527816782391857934&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~hot_rank-2-22109925-null-null.142^v11^control,157^v13^new_3&utm_term=python+socket&spm=1018.2226.3001.4187)

- [python3 字符串str和bytes的相互转换](https://blog.csdn.net/kids_budong_c/article/details/123672994?ops_request_misc=&request_id=&biz_id=102&utm_term=python%20str%E8%BD%ACbytes&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-123672994.142^v11^control,157^v13^new_3&spm=1018.2226.3001.4187)

- [【快速调用】基于mvc架构的pyqt架构封装](https://blog.csdn.net/linZinan_/article/details/112460133)