Changeset 82

Show
Ignore:
Timestamp:
Thu Sep 15 19:55:12 2005
Author:
giovannibajo
Message:

More formatting issues; Add fair warning before appendix

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/doc/source/Tutorial.rst

    r81 r82  
    660 660  
    661 661 kws  
      662     Possible keyword arguments:  
    662 663  
    663 664     console  
     
    711 712 ::  
    712 713  
    713         COLLECT(\*args, \*\*kws)  
      714       COLLECT(*args, **kws)  
    713 714  
    714 715  
     
    718 719  
    719 720 kws  
    720    
      721     Possible keyword arguments:  
      722      
    721 723     name  
    722 724         The name of the directory to be built.  
     
    1131 1133 |GOBACK|  
    1132 1134  
    1133   ZlibArchive  
    1134   A ZlibArchive contains compressed .pyc (or .pyo) files. The Table of Contents  
      1135 ``ZlibArchive``  
      1136 ---------------  
      1137 A ``ZlibArchive`` contains compressed ``.pyc`` (or ``.pyo``) files. The Table of Contents  
    1135 1138 is a marshalled dictionary, with the key (the module's name as given in an  
    1136   "import" statement) associated with a seek position and length. Because it is  
    1137   all marshaled Python, ZlibArchives are completely cross-platform.  
      1139 ``import`` statement) associated with a seek position and length. Because it is  
      1140 all marshalled Python, ``ZlibArchives`` are completely cross-platform.  
    1138 1141  
    1139   A ZlibArchive hooks in with `iu.py`_ so that, with a little setup, the archived  
      1142 A ``ZlibArchive`` hooks in with `iu.py`_ so that, with a little setup, the archived  
    1139 1142 modules can be imported transparently. Even with compression at level 9, this  
    1140 1143 works out to being faster than the normal import. Instead of searching  
    1141   sys.path, there's a lookup in the dictionary. There's no stat-ing of the .py  
    1142   and .pyc and no file opens (the file is already open). There's just a seek, a  
      1144 ``sys.path``, there's a lookup in the dictionary. There's no ``stat``-ing of the ``.py``  
      1145 and ``.pyc`` and no file opens (the file is already open). There's just a seek, a  
    1143 1146 read and a decompress. A traceback will point to the source file the archive  
    1144   entry was created from (the __file__ attribute from the time the .pyc was  
      1147 entry was created from (the ``__file__`` attribute from the time the ``.pyc`` was  
    1144 1147 compiled). On a user's box with no source installed, this is not terribly  
    1145 1148 useful, but if they send you the traceback, at least you can make sense of it.  
     
    1152 1154 |GOBACK|  
    1153 1155  
    1154   CArchive  
    1155   A CArchive contains whatever you want to stuff into it. It's very much like a  
    1156   .zip file. They are easy to create in Python and unpack from C code. CArchives  
      1156 ``CArchive``  
      1157 ------------  
      1158 A ``CArchive`` contains whatever you want to stuff into it. It's very much like a  
      1159 ``.zip`` file. They are easy to create in Python and unpack from C code. ``CArchives``  
    1157 1160 can be appended to other files (like ELF and COFF executables, for example).  
    1158   To allow this, they are opened from the end, so the TOC for a CArchive is at  
    1159   the back, followed only by a cookie that tells you where the TOC starts and  
      1161 To allow this, they are opened from the end, so the ``TOC`` for a ``CArchive`` is at  
      1162 the back, followed only by a cookie that tells you where the ``TOC`` starts and  
    1160 1163 where the archive itself starts.  
    1161 1164  
    1162   CArchives can also be embedded within other CArchives. The inner archive can be  
      1165 ``CArchives`` can also be embedded within other ``CArchives``. The inner archive can be  
    1162 1165 opened in place (without extraction).  
    1163 1166  
    1164   Each TOC entry is variable length. The first field in the entry tells you the  
      1167 Each ``TOC`` entry is variable length. The first field in the entry tells you the  
    1164 1167 length of the entry. The last field is the name of the corresponding packed  
    1165 1168 file. The name is null terminated. Compression is optional by member.  
    1166 1169  
    1167 1170 There is also a type code associated with each entry. If you're using a  
    1168   CArchive as a .zip file, you don't need to worry about this. The type codes  
      1171 ``CArchive`` as a ``.zip`` file, you don't need to worry about this. The type codes  
    1168 1171 are used by the self-extracting executables.  
    1169 1172  
     
    1183 1185 but it has an exception such that you can use it to compile commercial products.  
    1184 1186  
    1185   In a nutshell the license is GPL for the source code with the exception that:  
      1187 In a nutshell, the license is GPL for the source code with the exception that:  
    1185 1187  
    1186 1188  #. You may use PyInstaller to compile commercial applications out of your  
    1187       source code  
      1189     source code.  
    1187 1189  
    1188    #. The resulting binaries generated by PyInstaller of your source code can be  
      1190  #. The resulting binaries generated by PyInstaller from your source code can be  
    1188 1190     shipped with whatever license you want.  
    1189 1191  
     
    1206 1208 ++++++++  
    1207 1209  
    1208   mf.py: A Modulefinder Replacement  
      1210 .. sidebar:: You can stop reading here...  
      1211  
      1212     ... if you are not interested in technical details. This appendix contains  
      1213     insights of the internal workings of |PyInstaller|, and you do not need this  
      1214     information unless you plan to work on |PyInstaller| itself.  
      1215  
      1216  
      1217 ``mf.py``: A Modulefinder Replacement  
      1218 -------------------------------------  
    1209 1219  
    1210   Module mf is modelled after iu.  
      1220 Module ``mf`` is modelled after ``iu``.  
    1210 1220  
    1211   It also uses ImportDirectors and Owners to partition the import name space.  
    1212   Except for the fact that these return Module instances instead of real module  
      1221 It also uses ``ImportDirectors`` and ``Owners`` to partition the import name space.  
      1222 Except for the fact that these return ``Module`` instances instead of real module  
    1213 1223 objects, they are identical.  
    1214 1224  
    1215   Instead of an ImportManager, mf has an ImportTracker managing things.  
      1225 Instead of an ``ImportManager``, ``mf`` has an ``ImportTracker`` managing things.  
    1215 1225  
    1216 1226 |GOBACK|