-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathextracttargz.py
29 lines (24 loc) · 1.18 KB
/
extracttargz.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
"""
/***************************************************************************
SimstockQGIS
copyright : (C) 2023 by UCL
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
import tarfile
import os
def main():
EP_dir = os.path.join(os.path.dirname(__file__), "EnergyPlus")
fpath = os.path.join(EP_dir, "EnergyPlus-8.9.0-40101eaafd-Darwin-x86_64.tar.gz")
with tarfile.open(fpath, "r:gz") as tar:
tar.extractall(EP_dir)
if __name__ == "__main__":
main()