mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-13 14:44:46 -04:00
Initial refactor commit
Added AMI UCP BIOS Extractor v2.0_a1 Added AMI BIOS Guard Extractor v4.0_a1
This commit is contained in:
parent
2029ffc8b7
commit
132457afda
14 changed files with 1240 additions and 731 deletions
19
common/script_get.py
Normal file
19
common/script_get.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
#coding=utf-8
|
||||
|
||||
# https://stackoverflow.com/a/22881871 by jfs
|
||||
|
||||
import os
|
||||
import sys
|
||||
import inspect
|
||||
|
||||
def get_script_dir(follow_symlinks=True):
|
||||
if getattr(sys, 'frozen', False):
|
||||
path = os.path.abspath(sys.executable)
|
||||
else:
|
||||
path = inspect.getabsfile(get_script_dir)
|
||||
|
||||
if follow_symlinks:
|
||||
path = os.path.realpath(path)
|
||||
|
||||
return os.path.dirname(path)
|
Loading…
Add table
Add a link
Reference in a new issue