<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Enrico,<div><br></div><div>I checked in the cleanup patch for TestCommanPython.py.</div><div>As for the 'import' command, can you rework the patch to rely on os.sep instead of '/'</div><div>as the pathname components separator?</div><div><br></div><div>Thanks.</div><div><br></div><div><div><div>On Oct 12, 2011, at 3:07 AM, Enrico Granata wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>the proposed patch provides an implementation of a new 'import' command for LLDB, based upon Python commands. an example usage is:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">(lldb) script import importcmd</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">(lldb)<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "> </span>command script add -f importcmd.pyimport_cmd import</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">(lldb)<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "> </span>import /Users/user/Documents/demo1.py</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">(lldb)<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "> </span>script demo1.test_function(1)</div></div><div>there is an included test case that checks for correctness of this new command by importing some Python script files and using the resulting modules</div><div><br></div><div>plus, this fixes a minor issue where the custom Python commands defined for the functionalities/command_python/ test case would not be cleaned up if the test case itself failed</div><div><br></div><div>Any feedback on this is most welcome.</div><div><br></div><div>Thanks,<br><div apple-content-edited="true">
<div>-<span class="Apple-converted-space"> </span><i>Enrico Granata</i></div>
</div>
</div></div><span><importcmd_patch.diff></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div></div>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></blockquote></div><br></div></body></html>