diff -r 3e4605cc3541 -r c1588f5a83e9 eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html --- a/eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html Thu Dec 17 14:30:46 2020 +0100 +++ b/eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html Thu Dec 17 14:40:06 2020 +0100 @@ -28,7 +28,7 @@ <h3>Global Attributes</h3> <table> -<tr><td>ArgInfo</td></tr> +<tr><td>ArgInfo</td></tr><tr><td>PYTHON_NAMES</td></tr> </table> <h3>Classes</h3> @@ -52,9 +52,45 @@ <td>Function to get information about arguments passed into a particular frame.</td> </tr> <tr> +<td><a href="#isExecutable">isExecutable</a></td> +<td>Function to check, if the given program is executable.</td> +</tr> +<tr> +<td><a href="#isPythonProgram">isPythonProgram</a></td> +<td>Function to check, if the given program is a Python interpreter or program.</td> +</tr> +<tr> +<td><a href="#isWindowsPlatform">isWindowsPlatform</a></td> +<td>Function to check, if this is a Windows platform.</td> +</tr> +<tr> +<td><a href="#patchArgumentStringWindows">patchArgumentStringWindows</a></td> +<td>Function to patch an argument string for Windows.</td> +</tr> +<tr> +<td><a href="#patchArguments">patchArguments</a></td> +<td>Function to patch the arguments given to start a program in order to execute it in our debugger.</td> +</tr> +<tr> <td><a href="#prepareJsonCommand">prepareJsonCommand</a></td> <td>Function to prepare a single command or response for transmission to the IDE.</td> </tr> +<tr> +<td><a href="#quoteArgs">quoteArgs</a></td> +<td>Function to quote the given list of arguments.</td> +</tr> +<tr> +<td><a href="#removeQuotesFromArgs">removeQuotesFromArgs</a></td> +<td>Function to remove quotes from the arguments list.</td> +</tr> +<tr> +<td><a href="#startsWithShebang">startsWithShebang</a></td> +<td>Function to check, if the given program start with a Shebang line.</td> +</tr> +<tr> +<td><a href="#stringToArgumentsWindows">stringToArgumentsWindows</a></td> +<td>Function to prepare a string of arguments for Windows platform.</td> +</tr> </table> <hr /> <hr /> @@ -182,6 +218,158 @@ <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> +<a NAME="isExecutable" ID="isExecutable"></a> +<h2>isExecutable</h2> +<b>isExecutable</b>(<i>program</i>) + +<p> + Function to check, if the given program is executable. +</p> +<dl> + +<dt><i>program</i> (str)</dt> +<dd> +program path to be checked +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +flag indicating an executable program +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="isPythonProgram" ID="isPythonProgram"></a> +<h2>isPythonProgram</h2> +<b>isPythonProgram</b>(<i>program</i>) + +<p> + Function to check, if the given program is a Python interpreter or + program. +</p> +<dl> + +<dt><i>program</i> (str)</dt> +<dd> +program to be checked +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +flag indicating a Python interpreter or program +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="isWindowsPlatform" ID="isWindowsPlatform"></a> +<h2>isWindowsPlatform</h2> +<b>isWindowsPlatform</b>(<i></i>) + +<p> + Function to check, if this is a Windows platform. +</p> +<dl> +<dt>Returns:</dt> +<dd> +flag indicating Windows platform +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="patchArgumentStringWindows" ID="patchArgumentStringWindows"></a> +<h2>patchArgumentStringWindows</h2> +<b>patchArgumentStringWindows</b>(<i>debugClient, argStr</i>) + +<p> + Function to patch an argument string for Windows. +</p> +<dl> + +<dt><i>debugClient</i> (DebugClient)</dt> +<dd> +reference to the debug client object +</dd> +<dt><i>argStr</i> (str)</dt> +<dd> +argument string +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +patched argument string +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="patchArguments" ID="patchArguments"></a> +<h2>patchArguments</h2> +<b>patchArguments</b>(<i>debugClient, arguments, noRedirect=False</i>) + +<p> + Function to patch the arguments given to start a program in order to + execute it in our debugger. +</p> +<dl> + +<dt><i>debugClient</i> (DebugClient)</dt> +<dd> +reference to the debug client object +</dd> +<dt><i>arguments</i> (list of str)</dt> +<dd> +list of program arguments +</dd> +<dt><i>noRedirect</i> (bool)</dt> +<dd> +flag indicating to not redirect stdin and stdout +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +modified argument list +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> <a NAME="prepareJsonCommand" ID="prepareJsonCommand"></a> <h2>prepareJsonCommand</h2> <b>prepareJsonCommand</b>(<i>method, params</i>) @@ -215,4 +403,128 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /> +<hr /> +<a NAME="quoteArgs" ID="quoteArgs"></a> +<h2>quoteArgs</h2> +<b>quoteArgs</b>(<i>args</i>) + +<p> + Function to quote the given list of arguments. +</p> +<dl> + +<dt><i>args</i> (list of str)</dt> +<dd> +list of arguments to be quoted +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +list of quoted arguments +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="removeQuotesFromArgs" ID="removeQuotesFromArgs"></a> +<h2>removeQuotesFromArgs</h2> +<b>removeQuotesFromArgs</b>(<i>args</i>) + +<p> + Function to remove quotes from the arguments list. +</p> +<dl> + +<dt><i>args</i> (list of str)</dt> +<dd> +list of arguments +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +list of unquoted strings +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="startsWithShebang" ID="startsWithShebang"></a> +<h2>startsWithShebang</h2> +<b>startsWithShebang</b>(<i>program</i>) + +<p> + Function to check, if the given program start with a Shebang line. +</p> +<dl> + +<dt><i>program</i> (str)</dt> +<dd> +program path to be checked +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +flag indicating an existing and valid shebang line +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +<hr /> +<a NAME="stringToArgumentsWindows" ID="stringToArgumentsWindows"></a> +<h2>stringToArgumentsWindows</h2> +<b>stringToArgumentsWindows</b>(<i>args</i>) + +<p> + Function to prepare a string of arguments for Windows platform. +</p> +<dl> + +<dt><i>args</i> (str)</dt> +<dd> +list of command arguments +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +list of command arguments +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> +</dl> +<dl> + +<dt>Raises <b>RuntimeError</b>:</dt> +<dd> +raised to indicate an illegal arguments parsing + condition +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> </body></html> \ No newline at end of file