home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / u / uu < prev   
Text File  |  1996-11-14  |  2KB  |  36 lines

  1. <TITLE>uu -- Python library reference</TITLE>
  2. Next: <A HREF="../b/binascii" TYPE="Next">binascii</A>  
  3. Prev: <A HREF="../b/binhex" TYPE="Prev">binhex</A>  
  4. Up: <A HREF="../i/internet_and_www" TYPE="Up">Internet and WWW</A>  
  5. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  6. <H1>10.14. Standard module <CODE>uu</CODE></H1>
  7. This module encodes and decodes files in uuencode format, allowing
  8. arbitrary binary data to be transferred over ascii-only connections.
  9. Whereever a file argument is expected, the methods accept either a
  10. pathname (<CODE>'-'</CODE> for stdin/stdout) or a file-like object.
  11. <P>
  12. Normally you would pass filenames, but there is one case where you
  13. have to open the file yourself: if you are on a non-unix platform and
  14. your binary file is actually a textfile that you want encoded
  15. unix-compatible you will have to open the file yourself as a textfile,
  16. so newline conversion is performed.
  17. <P>
  18. This code was contributed by Lance Ellinghouse, and modified by Jack
  19. Jansen.
  20. <P>
  21. The <CODE>uu</CODE> module defines the following functions:
  22. <P>
  23. <DL><DT><B>encode</B> (<VAR>in_file</VAR>, <VAR>out_file</VAR>[, <VAR>name</VAR>, <VAR>mode</VAR>]) -- function of module uu<DD>
  24. Uuencode file <VAR>in_file</VAR> into file <VAR>out_file</VAR>.  The uuencoded
  25. file will have the header specifying <VAR>name</VAR> and <VAR>mode</VAR> as the
  26. defaults for the results of decoding the file. The default defaults
  27. are taken from <VAR>in_file</VAR>, or <CODE>'-'</CODE> and <CODE>0666</CODE>
  28. respectively. 
  29. </DL>
  30. <DL><DT><B>decode</B> (<VAR>in_file</VAR>[, <VAR>out_file</VAR>, <VAR>mode</VAR>]) -- function of module uu<DD>
  31. This call decodes uuencoded file <VAR>in_file</VAR> placing the result on
  32. file <VAR>out_file</VAR>. If <VAR>out_file</VAR> is a pathname the <VAR>mode</VAR> is
  33. also set. Defaults for <VAR>out_file</VAR> and <VAR>mode</VAR> are taken from
  34. the uuencode header.
  35. </DL>
  36.