Changeset 62
- Timestamp:
- 12/17/06 17:09:59 (2 years ago)
- Files:
-
- trunk/html_doc/celerid.html (modified) (1 diff)
- trunk/html_doc/class_wrapping.html (modified) (2 diffs)
- trunk/html_doc/install.html (modified) (2 diffs)
- trunk/raw_html (added)
- trunk/raw_html/basics.html (added)
- trunk/raw_html/celerid.html (added)
- trunk/raw_html/class_wrapping.html (added)
- trunk/raw_html/conversion.html (added)
- trunk/raw_html/create_html.py (added)
- trunk/raw_html/credits.html (added)
- trunk/raw_html/except_wrapping.html (added)
- trunk/raw_html/func_wrapping.html (added)
- trunk/raw_html/header_template.html (added)
- trunk/raw_html/index.html (added)
- trunk/raw_html/install.html (added)
- trunk/raw_html/pydobject.html (added)
- trunk/raw_html/struct_wrapping.html (added)
- trunk/raw_html/vsboost.html (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/html_doc/celerid.html
r57 r62 57 57 <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>True</code> to the next three flags.</dd> 58 58 <dt><code>no_pyd</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 59 <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By specifying this, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>no_pyd</code> and this are <code>False</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). </dd>59 <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By specifying this, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>no_pyd</code> and this are <code>False</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). <b>Important note:</b> StackThreads does not currently work with GDC! CeleriD will always set this flag to <code>True</code> when using GDC! This means that opApply wrapping is not available on Linux at this time.</dd> 60 60 <dt><code>no_meta</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if this is specified and <code>no_pyd</code> is not.</dd> 61 61 </dl> trunk/html_doc/class_wrapping.html
r59 r62 59 59 60 60 <dt><code>static void iter(<span class="t_arg">iter_t</span>) ();</code></dt> 61 <dd>This allows the user to specify a different overload of opApply than the default. (The default is always the one that is lexically first.) The <span class="t_arg">iter_t</span> argument should be the type of the delegate that forms the argument to opApply. This might be e.g. <code>int delegate(inout int)</code>. Don't forget the <code>inout</code> modifiers! </dd>61 <dd>This allows the user to specify a different overload of opApply than the default. (The default is always the one that is lexically first.) The <span class="t_arg">iter_t</span> argument should be the type of the delegate that forms the argument to opApply. This might be e.g. <code>int delegate(inout int)</code>. Don't forget the <code>inout</code> modifiers! (This is not available in Linux; see the note below on opApply wrapping.)</dd> 62 62 63 63 <dt><code>static void alt_iter(alias <span class="t_arg">fn</span>, char[] <span class="t_arg">name</span> = symbolnameof!(fn), <span class="t_arg">iter_t</span> = <i>implementationDetail</i>) (char[] <span class="arg">docstring</span>="");</code></dt> 64 <dd>This wraps alternate iterator methods as Python methods that return iterator objects. The wrapped methods should have a signature like that of opApply. (In other words, they should be methods intended to be used with D's ability to iterate over delgates.) The <span class="t_arg">iter_t</span> argument should be the type of the delegate argument to the method. This will usually be derived automatically. 64 <dd>This wraps alternate iterator methods as Python methods that return iterator objects. The wrapped methods should have a signature like that of opApply. (In other words, they should be methods intended to be used with D's ability to iterate over delgates.) The <span class="t_arg">iter_t</span> argument should be the type of the delegate argument to the method. This will usually be derived automatically. (This is not available in Linux; see the note below on opApply wrapping.) 65 65 </dd> 66 66 </dl> … … 100 100 101 101 <dl> 102 <dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. </dd>102 <dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. This package does not work in GDC, and so opApply wrapping is not available in Linux. See also the <a href="celerid.html"><code>no_st</code></a> option offered by CeleriD.</dd> 103 103 <dt><code>opSlice, opSliceAssign</code></dt> <dd>Pyd only supports these overloads if both of their two indexes are implicitly convertable to type <code>int</code>. This is a limitation of the Python/C API. Note that this means the zero-argument form of opSlice (for allowing the "empty slice," e.g. <code>foo[]</code>) cannot be wrapped. <i>(I may work around this in the future.)</i> Because Pyd can only automatically wrap the lexically-first method in a class, it will fail to wrap opSlice and opSliceAssign if you define an empty form first.</dd> 104 104 <dt><code>opCat, opCatAssign</code></dt> <dd>Python does not have a dedicated array concatenation operator. The plus sign (<code>+</code>) is reused for this purpose. Therefore, odd behavior may result with classes that define both <code>opAdd/opAddAssign</code> and one or both of these operators. (Consider yourself warned.) However, the Python/C API considers addition and concatenation distinct operations, and so both of these sets of operator overloads are supported.</dd> trunk/html_doc/install.html
r57 r62 29 29 <h3>Requirements</h3> 30 30 31 <p>Pyd requires Python 2.4 or newer and the latest version of DMD .</p>31 <p>Pyd requires Python 2.4 or newer and the latest version of DMD (on Windows) or GDC (on Linux). At the time of this writing, those versions are DMD 0.177 and GDC 0.20.</p> 32 32 33 <p> At the moment, Pyd is only supported on Windows using the <a href="http://digitalmars.com/d/index.html">DMD</a> compiler. Linux support is contingent on GDC catching up to at least DMD 0.176. Support for Derek Parnell's <code>bud</code> is also planned.</p>33 <p>Pyd is supported on Windows using the <a href="http://digitalmars.com/d/index.html">DMD</a> compiler and on Linux using <a href="http://dgcc.sourceforge.net/">GDC</a>. Support for Derek Parnell's <code>bud</code> is also planned.</p> 34 34 35 35 <p>Because Pyd is still in development, it is only available via Subversion. The repository is located <a href="http://svn.dsource.org/projects/pyd/trunk">here</a>.</p> … … 39 39 <p>Pyd installs itself as a Python package called <a href="celerid.html"><code>celerid</code></a>. Once you have downloaded the "trunk" directory, simply run <code>python setup.py install</code> in that directory, and the <code>celerid</code> directory will be created in Python's site-packages directory.</p> 40 40 41 <p>CeleriD is an extension to distutils. It tells Python how to use DMD. By default, it uses the first version of DMD it can find on the system PATH. If DMD is not on your PATH, or you wish to specify a specific version of DMD, you may set the DMD_BIN environment variable to point to the DMDexecutable you wish to use.</p>41 <p>CeleriD is an extension to distutils. It tells Python how to use the D compiler. By default, it uses the first version of the compiler that it can find on the system PATH. If the compiler is not on your PATH, or you wish to specify a specific version of it, you may set the DMD_BIN or GDC_BIN environment variable (for Windows and Linux, respectively) to point to the executable you wish to use.</p> 42 42 </div> 43 43
