Ich empfehle, meinen neuen Bibliotheksbefehlsbefehl zu verwenden.
CommandPack - Eine plattformübergreifende Bibliothek für Erstellung, Speicherung, Verwaltung von Befehlen und Befehlspaketen. Ausführung von Befehlen, Parsen von Dateien mit Befehlspaketen.
Autor und Entwickler: AA Suvorov
Kommandopack v0.3.1
Eine plattformübergreifende Bibliothek zur Erstellung, Speicherung, Verwaltung von Befehlen und Befehlspaketen. Ausführung von Befehlen, Parsen von Dateien mit Befehlspaketen.
Wird verwendet, um Dienstprogramme für die Arbeit mit Befehlen (Ausführung, Start, Autorun, Speicher) zu erstellen.
Sie können Ihre Befehle in einfachen und verständlichen Dateien aufbewahren, sie an einem Ort sammeln, in benannte Kategorien (Pakete) aufgeteilt und jederzeit ausführen:
Die Dateien müssen die Erweiterung *.cfg oder *.json haben und die richtige Struktur haben:
[package name 1]
command 1
command 2
command N
[package name 2]
command 1
command 2
command N
{
"name1" :
[
"command1" ,
"command2" ,
"commandN"
] ,
"name2" :
[
"command1" ,
"command2" ,
"commandN"
]
} pip3 install commandpackVerfügbare Werkzeuge:
from commandpack . factories import Factory
os_executor = Factory . tools . get_os_executor ()
sub_executor = Factory . tools . get_sub_executor ()
executor = Factory . tools . get_executor ()
command = Factory . tools . command_pack . create_command ( 'pip list' )
pack = Factory . tools . command_pack . create_pack ( 'default' )
cfg_parser = Factory . tools . parsers . get_cfg_parser ()
json_parser = Factory . tools . parsers . get_json_parser ()
parser = Factory . tools . parsers . get_parser ()
pack_maker = Factory . tools . makers . get_pack_maker ()Versorgungsunternehmen, die mit der Verwendung von Arbeiten "CommandPack" erstellt wurden, ohne Probleme in Terux.
pip install commandpack .Versorgungsunternehmen, die mit der Verwendung von Work "CommandPack" erstellt wurden, ohne Probleme in Windows:
pip install pytestpytest -v pip install pytest-coveragepytest --cov 
pytest --cov --cov-report=html THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------
Licensed under the terms of the BSD 3-Clause License
(see LICENSE for details).
Copyright © 2018-2024, A.A Suvorov
All rights reserved.
--------------------------------------------------------