PipxInterface/Documentation/Source/Plugin_Pipx_Interface.PipxInterface.Pipx.html

changeset 78
5efcdee9c170
parent 49
ec976c5b88ae
child 83
d841c572a465
--- a/PipxInterface/Documentation/Source/Plugin_Pipx_Interface.PipxInterface.Pipx.html	Sat Sep 07 19:29:57 2024 +0200
+++ b/PipxInterface/Documentation/Source/Plugin_Pipx_Interface.PipxInterface.Pipx.html	Sun Sep 15 11:57:39 2024 +0200
@@ -20,7 +20,7 @@
 <table>
 <tr>
 <td><a href="#Pipx">Pipx</a></td>
-<td>Class implementing the pip GUI logic.</td>
+<td>Class implementing the pipx interface.</td>
 </tr>
 </table>
 
@@ -34,9 +34,18 @@
 <a NAME="Pipx" ID="Pipx"></a>
 <h2>Pipx</h2>
 <p>
-    Class implementing the pip GUI logic.
+    Class implementing the pipx interface.
 </p>
 
+<h3>Signals</h3>
+<dl>
+
+<dt>outdatedPackage(package:str, latestVer:str, oudatedDeps:bool)</dt>
+<dd>
+emitted with
+    the result of a check for outdated status of a package
+</dd>
+</dl>
 <h3>Derived from</h3>
 QObject
 <h3>Class Attributes</h3>
@@ -56,6 +65,18 @@
 <td>Constructor</td>
 </tr>
 <tr>
+<td><a href="#Pipx.__asyncProcessError">__asyncProcessError</a></td>
+<td>Private method to handle a process error signal.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.__asyncProcessFinished">__asyncProcessFinished</a></td>
+<td>Private method to handle the process finished signal.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.__checkPackageOutdatedCb">__checkPackageOutdatedCb</a></td>
+<td>Private method handling the pipx process output of a check for an outdated package.</td>
+</tr>
+<tr>
 <td><a href="#Pipx.__getPackageDependencies">__getPackageDependencies</a></td>
 <td>Private method to get a list of dependencies of a given package.</td>
 </tr>
@@ -68,6 +89,14 @@
 <td>Private method to allow the JSON decoding of Path objects of a spec metadata file as created by 'pipx list --json'.</td>
 </tr>
 <tr>
+<td><a href="#Pipx.__runPipxAsyncProcess">__runPipxAsyncProcess</a></td>
+<td>Private method to execute pipx with the given arguments asynchronously.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.__runPipxProcess">__runPipxProcess</a></td>
+<td>Private method to execute pipx with the given arguments.</td>
+</tr>
+<tr>
 <td><a href="#Pipx.checkPackageOutdated">checkPackageOutdated</a></td>
 <td>Public method to check, if a given package is outdated.</td>
 </tr>
@@ -92,6 +121,10 @@
 <td>Public method to get the list of outdated package dependencies.</td>
 </tr>
 <tr>
+<td><a href="#Pipx.getPackageVersion">getPackageVersion</a></td>
+<td>Public method to get the version of a package.</td>
+</tr>
+<tr>
 <td><a href="#Pipx.getPipxInterpretersList">getPipxInterpretersList</a></td>
 <td>Public method returning a list all standalone interpreters.</td>
 </tr>
@@ -136,10 +169,6 @@
 <td>Public method to reinstall the given package with given options.</td>
 </tr>
 <tr>
-<td><a href="#Pipx.runPipxProcess">runPipxProcess</a></td>
-<td>Public method to execute pipx with the given arguments.</td>
-</tr>
-<tr>
 <td><a href="#Pipx.uninstallAllPackages">uninstallAllPackages</a></td>
 <td>Public method to uninstall all pipx managed packages.</td>
 </tr>
@@ -189,6 +218,74 @@
 reference to the user interface object
 </dd>
 </dl>
+<a NAME="Pipx.__asyncProcessError" ID="Pipx.__asyncProcessError"></a>
+<h4>Pipx.__asyncProcessError</h4>
+<b>__asyncProcessError</b>(<i>process, error</i>)
+<p>
+        Private method to handle a process error signal.
+</p>
+
+<dl>
+
+<dt><i>process</i> (QProcess)</dt>
+<dd>
+reference to the process
+</dd>
+<dt><i>error</i> (QProcess.ProcessError)</dt>
+<dd>
+error that occurred
+</dd>
+</dl>
+<a NAME="Pipx.__asyncProcessFinished" ID="Pipx.__asyncProcessFinished"></a>
+<h4>Pipx.__asyncProcessFinished</h4>
+<b>__asyncProcessFinished</b>(<i>callback, process, _exitCode, exitStatus</i>)
+<p>
+        Private method to handle the process finished signal.
+</p>
+
+<dl>
+
+<dt><i>callback</i> (function)</dt>
+<dd>
+reference to the function to be called a success flag and the
+            process output or error message
+</dd>
+<dt><i>process</i> (QProcess)</dt>
+<dd>
+reference to the process
+</dd>
+<dt><i>_exitCode</i> (int)</dt>
+<dd>
+exit code of the process
+</dd>
+<dt><i>exitStatus</i> (QProcess.ExitStatus)</dt>
+<dd>
+exit status of the process
+</dd>
+</dl>
+<a NAME="Pipx.__checkPackageOutdatedCb" ID="Pipx.__checkPackageOutdatedCb"></a>
+<h4>Pipx.__checkPackageOutdatedCb</h4>
+<b>__checkPackageOutdatedCb</b>(<i>package, ok, output</i>)
+<p>
+        Private method handling the pipx process output of a check for an outdated
+        package.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+name of the package
+</dd>
+<dt><i>ok</i> (bool)</dt>
+<dd>
+flag indicating the process ended successfully
+</dd>
+<dt><i>output</i> (str)</dt>
+<dd>
+output of the pipx process or an error message
+</dd>
+</dl>
 <a NAME="Pipx.__getPackageDependencies" ID="Pipx.__getPackageDependencies"></a>
 <h4>Pipx.__getPackageDependencies</h4>
 <b>__getPackageDependencies</b>(<i>package, uptodate=False, outdated=False</i>)
@@ -269,6 +366,68 @@
 dict or pathlib.Path
 </dd>
 </dl>
+<a NAME="Pipx.__runPipxAsyncProcess" ID="Pipx.__runPipxAsyncProcess"></a>
+<h4>Pipx.__runPipxAsyncProcess</h4>
+<b>__runPipxAsyncProcess</b>(<i>args, callback=None, timeout=30000</i>)
+<p>
+        Private method to execute pipx with the given arguments asynchronously.
+</p>
+
+<dl>
+
+<dt><i>args</i> (list of str)</dt>
+<dd>
+list of command line arguments for pipx
+</dd>
+<dt><i>callback</i> (function (optional))</dt>
+<dd>
+reference to the function to be called a success flag and the
+            process output or error message (defaults to None)
+</dd>
+<dt><i>timeout</i> (int (optional))</dt>
+<dd>
+timeout for the process in milliseconds (defaults to 30000)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+reference to the generated process object
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+QProcess
+</dd>
+</dl>
+<a NAME="Pipx.__runPipxProcess" ID="Pipx.__runPipxProcess"></a>
+<h4>Pipx.__runPipxProcess</h4>
+<b>__runPipxProcess</b>(<i>args</i>)
+<p>
+        Private method to execute pipx with the given arguments.
+</p>
+
+<dl>
+
+<dt><i>args</i> (list of str)</dt>
+<dd>
+list of command line arguments for pipx
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing a flag indicating success and the output
+            of the process
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bool, str)
+</dd>
+</dl>
 <a NAME="Pipx.checkPackageOutdated" ID="Pipx.checkPackageOutdated"></a>
 <h4>Pipx.checkPackageOutdated</h4>
 <b>checkPackageOutdated</b>(<i>package</i>)
@@ -283,19 +442,6 @@
 name of the package
 </dd>
 </dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-tuple containing the latest version in case the package is outdated
-            or None otherwise and a flag indicating any outdated dependencies
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-tuple of (str or None, bool)
-</dd>
-</dl>
 <a NAME="Pipx.createSpecMetadataFile" ID="Pipx.createSpecMetadataFile"></a>
 <h4>Pipx.createSpecMetadataFile</h4>
 <b>createSpecMetadataFile</b>(<i>specFile</i>)
@@ -403,6 +549,32 @@
 list of tuple of (str, str, str)
 </dd>
 </dl>
+<a NAME="Pipx.getPackageVersion" ID="Pipx.getPackageVersion"></a>
+<h4>Pipx.getPackageVersion</h4>
+<b>getPackageVersion</b>(<i>package</i>)
+<p>
+        Public method to get the version of a package.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+package name
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+package version
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
 <a NAME="Pipx.getPipxInterpretersList" ID="Pipx.getPipxInterpretersList"></a>
 <h4>Pipx.getPipxInterpretersList</h4>
 <b>getPipxInterpretersList</b>(<i></i>)
@@ -658,33 +830,6 @@
             on the system (defaults to False)
 </dd>
 </dl>
-<a NAME="Pipx.runPipxProcess" ID="Pipx.runPipxProcess"></a>
-<h4>Pipx.runPipxProcess</h4>
-<b>runPipxProcess</b>(<i>args</i>)
-<p>
-        Public method to execute pipx with the given arguments.
-</p>
-
-<dl>
-
-<dt><i>args</i> (list of str)</dt>
-<dd>
-list of command line arguments for pipx
-</dd>
-</dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-tuple containing a flag indicating success and the output
-            of the process
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-tuple of (bool, str)
-</dd>
-</dl>
 <a NAME="Pipx.uninstallAllPackages" ID="Pipx.uninstallAllPackages"></a>
 <h4>Pipx.uninstallAllPackages</h4>
 <b>uninstallAllPackages</b>(<i></i>)

eric ide

mercurial