diff options
author | Enrico Granata <egranata@apple.com> | 2013-03-25 17:37:39 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-03-25 17:37:39 +0000 |
commit | ceba071330ec0004d5d44cdb0ba9728df231c223 (patch) | |
tree | e67043d513f9fe2bf568d74840f0c0e8bfbfdcf3 /lldb/www/python-reference.html | |
parent | 51cb2fa1c3e867eef7df91135d56d33dded0fb39 (diff) | |
download | bcm5719-llvm-ceba071330ec0004d5d44cdb0ba9728df231c223.tar.gz bcm5719-llvm-ceba071330ec0004d5d44cdb0ba9728df231c223.zip |
- Masking out SBCommandReturnObject::Printf() from the Python layer because SWIG and varargs do not get along well.
It is replaced by a Print("str") call which is equivalent to Printf("%s","str")
- Providing file-like behavior for SBStream with appropriate extension write() and flush() calls, plus documenting that these are only meant and only exist for Python
Documenting the file-like behavior on our website
llvm-svn: 177877
Diffstat (limited to 'lldb/www/python-reference.html')
-rwxr-xr-x | lldb/www/python-reference.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/www/python-reference.html b/lldb/www/python-reference.html index 86edbc54cdc..daf0b98869d 100755 --- a/lldb/www/python-reference.html +++ b/lldb/www/python-reference.html @@ -368,10 +368,9 @@ Enter your Python command(s). Type 'DONE' to end. <b>lldb.SBCommandReturnObject</b>
</td>
<td class="content">
- A return object where you can indicate the success or failure of your command. You can also
- provide information for the command result by printing data into it. You can also just print
- data as you normally would in a python script and the output will show up; this is useful for
- logging, but the real output for your command should go in the result object.
+ A return object which encapsulates success/failure information for the command and output text
+ that needs to be printed as a result of the command. The plain Python "print" command also works but
+ text won't go in the result by default (it is useful as a temporary logging facility).
</td>
</tr>
<tr>
@@ -387,6 +386,9 @@ Enter your Python command(s). Type 'DONE' to end. </td>
</tr>
</table>
+ <p>As a convenience, you can treat the result object as a Python file object, and say
+ print >>result, "my command does lots of cool stuff". SBCommandReturnObject and SBStream
+ both support this file-like behavior by providing write() and flush() calls at the Python layer.</p>
<p>One other handy convenience when defining lldb command-line commands is the command
<b>command script import</b> which will import a module specified by file path - so you
don't have to change your PYTHONPATH for temporary scripts. It also has another convenience
|