O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
PycacheRemover Class Reference
Inheritance diagram for PycacheRemover:

Public Member Functions

def __init__ (self)
 

Detailed Description

This class creates two python commands in order to remove pycache files recursively

Args:
    object (str): Creates two python command for deleting pycache files

Definition at line 23 of file pycacheRemover.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Definition at line 31 of file pycacheRemover.py.

31 def __init__(self):
32
33 super(PycacheRemover, self).__init__()
34
35 commandOne = ("python3 -Bc " + '"' + "import pathlib;" + "[p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]" + '"')
36 commandTwo = ("python3 -Bc" + '"' + "import pathlib;" + "[p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]" + '"')
37
38 os.system(commandOne)
39 os.system(commandTwo)
40
41

The documentation for this class was generated from the following file: