Skip to main content

A package that uses Python to make communication easier

Project description

ComsPy

A package that uses Python to make communication easier

Latest release:2022.3

0. A declaration for users using version 2022.1

If you're still using version 2022.1, please note:

  1. README.md:The sample code is wrong, please change all compys to comspy
  2. demos1.py and demos2.py:Please change all compys to comspy
1. How to use
(1) User

You need to create two programs to use this module, one called Server.py and the other called Client.py

Then type in Server.py:

#English
import comspy.user.Server_English
comspy.user.Server_English.start()

#Chinese
import comspy.user.Server_Chinese
comspy.user.Server_Chinese.start()

In the Client.py input:

#English
import compy.user.Client_English
comspy.user.Client_English.start()

#Chinese
import compy.user.Client_Chinese
comspy.user.Client_Chinese.start()

Run, and then enter the same communication port

input "QUIT" to exit

Note: they must be the same, otherwise normal communication will not work, unless you want to get to know an unknown stranger by chance

We will continue to update, try to make the interface in a short time, thank you for using

(2)Developer

Example:

#Server.py
from comspy.developer import * #import all functions

server_socket_init() #init the server socket
server_socket_bind(int(input("Enter a port:")))#set the connection
server_setlisten(3)#set the maximum of listening
server_buildconnect()#build th connection
while True:
	msg = input("Enter a msg:")
	server_sendmsg(msg)#send message
	if msg =="QUIT":
		exit()#stop
#Client.py
from comspy.developer import * #import all functions

client_socket_init()#init the client socket
client_connect(int(input("Enter a port:")))#set and build the connection
while True:
	msg = client_receivemsg(2048)#receive message
	if msg =="QUIT":
		exit()#stop
	else:
		print(msg)
2. What's new

There are now two modes: developer and user

You can use developer mode to create your own communication software

You can also use user mode to communicate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

comspy-2022.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comspy-2022.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file comspy-2022.3.tar.gz.

File metadata

  • Download URL: comspy-2022.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for comspy-2022.3.tar.gz
Algorithm Hash digest
SHA256 3f2cc123464f03aa42c1d03afa225f1649ab604eb309263e338afa912778c8a6
MD5 45ee093d220c860728b2a27508f1f957
BLAKE2b-256 0d326218ea029b4e4e5ca711364eb7054d04040aa5635858b77c735d2a4edde6

See more details on using hashes here.

File details

Details for the file comspy-2022.3-py3-none-any.whl.

File metadata

  • Download URL: comspy-2022.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for comspy-2022.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e394fbde6b090bd345ffc8c8bdaf0c2722b611d8f111dd86ca670292daf05f80
MD5 669dfd170b9ad559ff593304d42040f0
BLAKE2b-256 26177fe1cbe51c459901c716455d4afaab042cb0a0ac91f0960cfdf9ec0cf66b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page