eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html

branch
maintenance
changeset 8043
0acf98cd089a
parent 7989
a21d673a8f99
--- a/eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Documentation/Source/eric6.DebugClients.Python.DebugUtilities.html	Mon Feb 01 10:38:16 2021 +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 />
@@ -74,7 +110,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 tuple of four things, where 'args' and 'kwonlyargs' are lists of
         argument names, and 'varargs' and 'varkw' are the names of the
@@ -117,25 +153,25 @@
 <dd>
 reference to the local variables dictionary
 </dd>
-<dt><i>formatarg=</i> (func)</dt>
+<dt><i>formatarg</i> (func)</dt>
 <dd>
 argument formatting function
 </dd>
-<dt><i>formatvarargs=</i> (func)</dt>
+<dt><i>formatvarargs</i> (func)</dt>
 <dd>
 variable arguments formatting function
 </dd>
-<dt><i>formatvarkw=</i> (func)</dt>
+<dt><i>formatvarkw</i> (func)</dt>
 <dd>
 keyword arguments formatting function
 </dd>
-<dt><i>formatvalue=</i> (func)</dt>
+<dt><i>formatvalue</i> (func)</dt>
 <dd>
 value formating functtion
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 formatted call signature
 </dd>
@@ -165,7 +201,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 tuple of four things, where 'args' is a list of the argument names,
         'varargs' and 'varkw' are the names of the * and ** arguments or None
@@ -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>Return:</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>Return:</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>Return:</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>Return:</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>Return:</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>)
@@ -202,7 +390,7 @@
 </dd>
 </dl>
 <dl>
-<dt>Returns:</dt>
+<dt>Return:</dt>
 <dd>
 prepared JSON command or response string
 </dd>
@@ -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>Return:</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>Return:</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>Return:</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>Return:</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

eric ide

mercurial