File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def listen_server(serversocket):
52
52
lock .acquire (True )
53
53
global_file_list .append (data [:- 3 ])
54
54
lock .release ()
55
- list_str = "/n " .join (local_file_list )
55
+ list_str = " " .join (local_file_list )
56
56
msg = str (addr [1 ]) + " " + list_str + " " + "###"
57
57
lock .acquire (True )
58
58
server_sock_accept .sendall (msg .encode ())
@@ -187,7 +187,7 @@ def main():
187
187
print ('Connect successful' )
188
188
lock .release ()
189
189
print ('sending list' )
190
- list_str = "/n " .join (local_file_list )
190
+ list_str = " " .join (local_file_list )
191
191
msg = str (sock [1 ]) + " " + list_str + " " + "###"
192
192
lock .acquire (True )
193
193
server_conn .sendall (msg .encode ())
@@ -217,6 +217,8 @@ def main():
217
217
command = input ()
218
218
if (command == 'close' or command == 'exit' ):
219
219
sys .exit ()
220
+ if (command == 'list' ):
221
+ print (global_file_list )
220
222
221
223
222
224
main ()
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def listen_server(serversocket):
52
52
lock .acquire (True )
53
53
global_file_list .append (data [:- 3 ])
54
54
lock .release ()
55
- list_str = "/n " .join (local_file_list )
55
+ list_str = " " .join (local_file_list )
56
56
msg = str (addr [1 ]) + " " + list_str + " " + "###"
57
57
lock .acquire (True )
58
58
server_sock_accept .sendall (msg .encode ())
@@ -187,7 +187,7 @@ def main():
187
187
print ('Connect successful' )
188
188
lock .release ()
189
189
print ('sending list' )
190
- list_str = "/n " .join (local_file_list )
190
+ list_str = " " .join (local_file_list )
191
191
msg = str (sock [1 ]) + " " + list_str + " " + "###"
192
192
lock .acquire (True )
193
193
server_conn .sendall (msg .encode ())
@@ -217,6 +217,8 @@ def main():
217
217
command = input ()
218
218
if (command == 'close' or command == 'exit' ):
219
219
sys .exit ()
220
+ if (command == 'list' ):
221
+ print (global_file_list )
220
222
221
223
222
224
main ()
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def listen_server(serversocket):
52
52
lock .acquire (True )
53
53
global_file_list .append (data [:- 3 ])
54
54
lock .release ()
55
- list_str = "/n " .join (local_file_list )
55
+ list_str = " " .join (local_file_list )
56
56
msg = str (addr [1 ]) + " " + list_str + " " + "###"
57
57
lock .acquire (True )
58
58
server_sock_accept .sendall (msg .encode ())
@@ -187,7 +187,7 @@ def main():
187
187
print ('Connect successful' )
188
188
lock .release ()
189
189
print ('sending list' )
190
- list_str = "/n " .join (local_file_list )
190
+ list_str = " " .join (local_file_list )
191
191
msg = str (sock [1 ]) + " " + list_str + " " + "###"
192
192
lock .acquire (True )
193
193
server_conn .sendall (msg .encode ())
@@ -217,6 +217,8 @@ def main():
217
217
command = input ()
218
218
if (command == 'close' or command == 'exit' ):
219
219
sys .exit ()
220
+ if (command == 'list' ):
221
+ print (global_file_list )
220
222
221
223
222
224
main ()
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def listen_server(serversocket):
52
52
lock .acquire (True )
53
53
global_file_list .append (data [:- 3 ])
54
54
lock .release ()
55
- list_str = "/n " .join (local_file_list )
55
+ list_str = " " .join (local_file_list )
56
56
msg = str (addr [1 ]) + " " + list_str + " " + "###"
57
57
lock .acquire (True )
58
58
server_sock_accept .sendall (msg .encode ())
@@ -187,7 +187,7 @@ def main():
187
187
print ('Connect successful' )
188
188
lock .release ()
189
189
print ('sending list' )
190
- list_str = "/n " .join (local_file_list )
190
+ list_str = " " .join (local_file_list )
191
191
msg = str (sock [1 ]) + " " + list_str + " " + "###"
192
192
lock .acquire (True )
193
193
server_conn .sendall (msg .encode ())
@@ -217,6 +217,11 @@ def main():
217
217
command = input ()
218
218
if (command == 'close' or command == 'exit' ):
219
219
sys .exit ()
220
+ if (command == 'listg' ):
221
+ print (global_file_list )
222
+ if (command == 'listl' ):
223
+ list_local ('Root' )
224
+ print (local_file_list )
220
225
221
226
222
227
main ()
You can’t perform that action at this time.
0 commit comments