Adjust Python module path handling
Simplifies top-level scripts and removes linting exceptions.
This commit is contained in:
parent
dad1d3e7f9
commit
16ee95b1d9
8 changed files with 13 additions and 41 deletions
|
|
@ -1,12 +1,7 @@
|
||||||
"""WizardKit: Auto Repair Tool"""
|
"""WizardKit: Auto Repair Tool"""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
"""WizardKit: Auto System Setup Tool"""
|
"""WizardKit: Auto System Setup Tool"""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
"""WizardKit: Build Kit (Windows)."""
|
"""WizardKit: Build Kit (Windows)."""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,9 @@ python.exe -i embedded_python_env.py
|
||||||
"""
|
"""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
wk.std.print_colored(
|
wk.std.print_colored(
|
||||||
(wk.cfg.main.KIT_NAME_FULL, ': ', 'Debug Console'),
|
(wk.cfg.main.KIT_NAME_FULL, ': ', 'Debug Console'),
|
||||||
('GREEN', None, 'YELLOW'),
|
('GREEN', None, 'YELLOW'),
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
"""WizardKit: Export Bitlocker Tool"""
|
"""WizardKit: Export Bitlocker Tool"""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
wk.os.win.export_bitlocker_info()
|
wk.os.win.export_bitlocker_info()
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
"""WizardKit: Launch Snappy Driver Installer Origin"""
|
"""WizardKit: Launch Snappy Driver Installer Origin"""
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
import wk
|
||||||
import sys
|
from wk.cfg.net import SDIO_SERVER
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
from wk.cfg.net import SDIO_SERVER # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
# STATIC VARIABLES
|
# STATIC VARIABLES
|
||||||
MOUNT_EXCEPTIONS = (
|
MOUNT_EXCEPTIONS = (
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,10 @@
|
||||||
# pylint: disable=invalid-name
|
# pylint: disable=invalid-name
|
||||||
# vim: sts=2 sw=2 ts=2
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
||||||
import os
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
import wk
|
||||||
sys.path.append(os.getcwd())
|
|
||||||
import wk # pylint: disable=wrong-import-position
|
|
||||||
|
|
||||||
|
|
||||||
# STATIC VARIABLES
|
# STATIC VARIABLES
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,9 @@ if ($MyInvocation.InvocationName -ne ".") {
|
||||||
}
|
}
|
||||||
Remove-Item "$Temp\python*.zip"
|
Remove-Item "$Temp\python*.zip"
|
||||||
Remove-Item "$Temp\*.whl"
|
Remove-Item "$Temp\*.whl"
|
||||||
|
foreach ($File in Get-ChildItem "$Bin\Python\*\*._pth") {
|
||||||
|
Add-Content "$File" "`n#WizardKit`n..\..\Scripts"
|
||||||
|
}
|
||||||
|
|
||||||
## Done ##
|
## Done ##
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue