Add windows and reorganize
This commit is contained in:
parent
de7a53eb25
commit
458353ebab
7 changed files with 116 additions and 27 deletions
11
package_alias.py
Normal file
11
package_alias.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import sys
|
||||
import os
|
||||
from glob import glob
|
||||
|
||||
info_name = 'info'
|
||||
info_file = glob(os.path.join('*', f'{info_name}.py'))[0]
|
||||
package_name = info_file.split(os.path.sep)[0]
|
||||
|
||||
package = __import__(f"{package_name}", fromlist=["main", "info"])
|
||||
if package_name not in sys.modules:
|
||||
sys.modules[package_name] = package
|
||||
Loading…
Add table
Add a link
Reference in a new issue