项目作者: Ranc58

项目描述 :
async chat based on sockets. with GUI
高级语言: Python
项目地址: git://github.com/Ranc58/gui_async_chat.git
创建时间: 2019-06-12T18:09:30Z
项目社区:https://github.com/Ranc58/gui_async_chat

开源协议:

下载


Async chat with GUI

GUI async chat with registration

How to install

Python version required: 3.7+

  1. Recomended use venv or virtualenv for better isolation.\
    Venv setup example: \
    python3 -m venv myenv\
    source myenv/bin/activate
  2. Install requirements: \
    pip3 install -r requirements.txt (alternatively try add sudo before command)
  3. cp env/.env env/.env_file. If it need setup env/.env_file (or use default settings):
    1. - `HOST` - chat host. \
    2. - `READ_PORT` - port for read messages from chat. \
    3. - `SEND_PORT` - port for write messages to chat. \
    4. - `ATTEMPTS_COUNT` - connection attempts before 3 sec timeout. \
    5. - `HISTORY_LOG_DIR_PATH` - path to folder where will be created `history_log.txt` file with chat messages history. \
    6. - `TOKEN_FILE_PATH` - path to file with unique user token(by default - `./token.txt`)\

How to launch

Instead environ vars you can use arguments. For more info use python3 chat_register.py --help (for register) and python3 gui_chat.py --help (for chat) \
For using environ vars you need source env/.env_file.

  1. If you want to register:
    1) Run python3 chat_register.py.
    2) Enter desired nickname. If all ok token will be saved in token file.
  2. If you are already registered or don’t want register:
    1) For signin token is required. You can set it in env/.env_file or use argument or load from file(
    uses argument too or default ./token.txt.).
    2) Run python3 gui_chat.py

Project Goals

The code is written for educational purposes. Training course for web-developers - DVMN.org