-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyHeaderMac.py
34 lines (31 loc) · 1.47 KB
/
pyHeaderMac.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# Created Syst: macOS Monterey 12.4 (21F79) Kernel: Darwin 21.5.0
# Created Plat: Python 3.10.5 ('v3.10.5:f377153967', 'Jun 6 2022 12:36:10')
# Created By : Jeromie Kirchoff
# Created Date: Mon Jun 13 03:22:59 2022 CDT
# Last ModDate: Fri Jul 1 13:31:07 2022 CDT
# =============================================================================
# Notes:
# =============================================================================
from datetime import datetime, timezone
import platform
from pyMacOsName import MacOSName
from getpass import getuser
def prPyHeader():
a = MacOSName().getCurrentSystemInfo()
print(f"""#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# Created Syst: {a[0]} {a[1]} {a[2]} ({a[3]}) Kernel: {platform.system()} {platform.release()}
# Created Plat: Python {platform.python_version()} {platform.python_build()}
# Created By : {getuser()}
# Created Date: {datetime.now().strftime('%c')} {datetime.now(timezone.utc).astimezone().tzname()}
# Last ModDate: {datetime.now().strftime('%c')} {datetime.now(timezone.utc).astimezone().tzname()}
# =============================================================================
# Notes:
# =============================================================================
""")
if __name__ == '__main__':
prPyHeader()