title: python error "TypeError : function takes exactly 1 argument (0 given)
body: <p>TypeError is appearing.
  i want to make a working code so that i can submit it</p>
  
  <p>i'm making a code
  : client upload a file -> server get a file and save at server.</p>
  
  <p>client is kali-linux, server is seed-ubuntu</p>
  
  <p>STEP</p>
  
  <ol>
  <li><p>Client
  echo "to be uploaded" > file.txt
  cat file.txt</p></li>
  <li><p>Server
  python server.py</p></li>
  <li><p>Client
  python client.py (ip addr of server) file.txt</p></li>
  </ol>
  
  <p>Then, at server</p>
  
  <p>connection from ~~~~
  file name : file.txt
  file created. file.txt</p>
  
  <p>should come up,</p>
  
  <p>And after this, at server
  when i type cat file.txt
  i should see the file_context.</p>
  
  <p>but i only see the error.</p>
  
  <p>this is server code</p>
  
  <p>server.py</p>
  
  <pre><code>import socket
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  port = 12345
  s.bind (('',port))
  s.listen(5)
  print "Listening..."
  while True:
      c, addr = s.accept()
      print 'Connection from ', addr
  
      file_name = c.recv(1024)
      print "File name: ", file_name
  
      f= open(file_name, "w")
      file_context = f.write()
      f.close()
  
      c.recv(1024)
      print "File created!"
      c.close
  </code></pre>
  
  <p>and this is client code.</p>
  
  <p>client.py</p>
  
  <pre><code>import socket
  import sys
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.connect((sys.argv[1], int(sys.argv[2])))
  s.send(sys.argv[3])
  data = s.send("")
  f = open(sys.argv[3], "r")
  f.read(data)
  f.close()
  s.close()
  print 'uploaded!'
  </code></pre>