<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 10/31/2010 12:03 PM, Corey Richardson wrote:
    <blockquote cite="mid:4CCD9339.3030809@aim.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <title></title>
      <br>
      <br>
      On 10/31/2010 11:51 AM, Chris King wrote:
      <blockquote cite="mid:4CCD9097.8080300@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        On 10/30/2010 10:08 PM, Corey Richardson wrote:
        <blockquote cite="mid:4CCCCFB2.4090900@aim.com" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          If you can send a list, have the list [name, data] where name
          is the file name and data is the raw binary of the file,
          contained in a string.<br>
          <br>
          On 10/30/2010 9:11 PM, Chris King wrote:
          <blockquote cite="mid:4CCCC23A.4040906@gmail.com" type="cite">&nbsp;Dear



            Tutors, <br>
            &nbsp;&nbsp;&nbsp; How would I send a file from one computer to another. I
            have modules which can send simple objects, such as
            dictionaries with simple objects in it. They can't send
            files thou. Please help. <br>
            <br>
            Sincerely, <br>
            &nbsp;&nbsp;&nbsp; Me <br>
            <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Tutor maillist  -  <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Tutor@python.org">Tutor@python.org</a>
To unsubscribe or change subscription options:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a>
</pre>
          </blockquote>
        </blockquote>
        how do I get raw binary from a file, or preferably a folder?<br>
      </blockquote>
      In order to send a folder, you would have to zip it up using the
      zipfile module.http://docs.python.org/library/zipfile.html<br>
      <br>
      To read from a file, you open it, and then read() it into a string
      like this:<br>
      for line in file:<br>
      &nbsp;&nbsp;&nbsp; string += string + file.readline()<br>
      <br>
      That is the basic concept, but it should carry you far.<br>
    </blockquote>
    I don't think readline will work an image. How do you get raw binary
    from a zip? Also make sure you do reply to the tutor list too, not
    just me.<br>
  </body>
</html>