Petit exemple pour toi suwako

This commit is contained in:
fomys 2019-05-13 04:07:36 +02:00
parent 9789723c5b
commit 74cd3df61a
3 changed files with 55 additions and 0 deletions

15
Pipfile Normal file
View File

@ -0,0 +1,15 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.7"

33
Pipfile.lock generated Normal file
View File

@ -0,0 +1,33 @@
{
"_meta": {
"hash": {
"sha256": "9b158f59346fab13c200408cd833a6470dc93b1e3eb4a977d2153bc3325856fd"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.7.3",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "4.19.27-gentoo-r1",
"platform_system": "Linux",
"platform_version": "#1 SMP Wed May 1 11:50:20 CEST 2019",
"python_full_version": "3.7.3",
"python_version": "3.7",
"sys_platform": "linux"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}

7
main.py Normal file
View File

@ -0,0 +1,7 @@
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("/tmp/bot.sock")
while True:
s.send(input(">>> ").encode('utf-8'))
s.close()