FreeCAD: Workbench Refactor
This commit is contained in:
parent
037827669a
commit
a58dcdafb1
386 changed files with 997 additions and 64533 deletions
|
@ -1,32 +0,0 @@
|
|||
# coding: utf-8
|
||||
# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@yandex.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
'''
|
||||
DESCRIPTION.
|
||||
Run cmd program with args and kwargs.
|
||||
Get return via cmd output.
|
||||
'''
|
||||
__version__ = '0.1'
|
||||
|
||||
import subprocess
|
||||
|
||||
|
||||
def cmd_proc(*args, **kwargs):
|
||||
command = list(args)
|
||||
for akey, aval in kwargs.items():
|
||||
command.append(f'--{akey}')
|
||||
command.append(str(aval))
|
||||
|
||||
return subprocess.run(command,
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
encoding='utf-8').stdout
|
Loading…
Add table
Add a link
Reference in a new issue