Skip to content

Commit

Permalink
added PIP installation + solved things
Browse files Browse the repository at this point in the history
  • Loading branch information
Yrod0200 committed Oct 8, 2024
1 parent 1116013 commit f8f21db
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 7 deletions.
13 changes: 10 additions & 3 deletions terminal/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import socket
import pyaudio
import threading
import sys


resp = input("Would you like to start from this file? (Y/n)" )

if not (resp.lower() == "y" or resp == ""):
sys.exit(1)
else:
pass

IP = input("Enter the IP you want to connect: ")
PORT = 6100
Expand All @@ -25,6 +34,7 @@ def is_utf_8(data):
return False



def start_connection():
try:
uname_input = main_socket.recv(1024).decode('utf-8')
Expand Down Expand Up @@ -93,6 +103,3 @@ def write_data():
print(f"ERROR: {e}")



if __name__ == "__main__":
start_connection()
Binary file added terminal/dist/purplemoon-0.1.0a0.tar.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions terminal/purplemoon.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Metadata-Version: 2.1
Name: purplemoon
Version: 0.1.0a0
9 changes: 9 additions & 0 deletions terminal/purplemoon.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
client.py
server.py
setup.py
purplemoon.egg-info/PKG-INFO
purplemoon.egg-info/SOURCES.txt
purplemoon.egg-info/dependency_links.txt
purplemoon.egg-info/entry_points.txt
purplemoon.egg-info/requires.txt
purplemoon.egg-info/top_level.txt
1 change: 1 addition & 0 deletions terminal/purplemoon.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions terminal/purplemoon.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
purplemoon = client:start_connection
purplemoon_server = server:handle_clients
2 changes: 2 additions & 0 deletions terminal/purplemoon.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pyaes
pyaudio
2 changes: 2 additions & 0 deletions terminal/purplemoon.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
client
server
15 changes: 11 additions & 4 deletions terminal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
# USE THIS ONLY FOR DEBBUGING, SINCE THE TERMINAL WILL SPAM TEXT


#test
import sys

resp = input("Would you like to start from this file? (Y/n)" )

if not (resp.lower() == "y" or resp == ""):
sys.exit(1)
else:
pass

import socket
import threading
Expand All @@ -12,6 +19,9 @@
PORT = 6100
STRING_HANDLE_PORT = 9857




MAX_CLIENTS = int(input("How many people?"))

srv_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Expand Down Expand Up @@ -129,6 +139,3 @@ def accept_string_port_connections():
if DEBUG:
print(f"VERBOSE: ERROR WHEN PAIRING STRING PORT: {e}")


if __name__ == "__main__":
handle_clients()
17 changes: 17 additions & 0 deletions terminal/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from setuptools import setup

setup(
name='purplemoon',
version='0.1.0a0',
py_modules=['client', 'server'],
entry_points={
'console_scripts': [
'purplemoon=client:start_connection',
'purplemoon_server=server:handle_clients'
],
},
install_requires=[
'pyaudio',
'pyaes',
],
)

0 comments on commit f8f21db

Please sign in to comment.