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"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
import wk # pylint: disable=wrong-import-position
|
||||
import wk
|
||||
|
||||
|
||||
# Classes
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
"""WizardKit: Auto System Setup Tool"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
import wk # pylint: disable=wrong-import-position
|
||||
import wk
|
||||
|
||||
|
||||
# Classes
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
"""WizardKit: Build Kit (Windows)."""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
import wk # pylint: disable=wrong-import-position
|
||||
import wk
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -5,12 +5,9 @@ python.exe -i embedded_python_env.py
|
|||
"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
import wk
|
||||
|
||||
|
||||
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.cfg.main.KIT_NAME_FULL, ': ', 'Debug Console'),
|
||||
('GREEN', None, 'YELLOW'),
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
"""WizardKit: Export Bitlocker Tool"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
import wk
|
||||
|
||||
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"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import sys
|
||||
import wk
|
||||
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
|
||||
MOUNT_EXCEPTIONS = (
|
||||
|
|
|
|||
|
|
@ -3,14 +3,10 @@
|
|||
# pylint: disable=invalid-name
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import pickle
|
||||
import sys
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(os.getcwd())
|
||||
import wk # pylint: disable=wrong-import-position
|
||||
import wk
|
||||
|
||||
|
||||
# STATIC VARIABLES
|
||||
|
|
|
|||
|
|
@ -180,6 +180,9 @@ if ($MyInvocation.InvocationName -ne ".") {
|
|||
}
|
||||
Remove-Item "$Temp\python*.zip"
|
||||
Remove-Item "$Temp\*.whl"
|
||||
foreach ($File in Get-ChildItem "$Bin\Python\*\*._pth") {
|
||||
Add-Content "$File" "`n#WizardKit`n..\..\Scripts"
|
||||
}
|
||||
|
||||
## Done ##
|
||||
Pop-Location
|
||||
|
|
|
|||
Loading…
Reference in a new issue