Linux business57.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
Server IP : 199.188.201.191 & Your IP : 18.224.44.53
Domains :
Cant Read [ /etc/named.conf ]
User : derozboy
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
setuptools /
command /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-08-20 08:31
__init__.py
594
B
-rw-r--r--
2024-08-19 07:28
alias.py
2.37
KB
-rw-r--r--
2024-08-19 07:28
bdist_egg.py
17.76
KB
-rw-r--r--
2024-08-19 07:28
bdist_rpm.py
1.47
KB
-rw-r--r--
2024-08-19 07:28
bdist_wininst.py
637
B
-rw-r--r--
2024-08-19 07:28
build_clib.py
4.38
KB
-rw-r--r--
2024-08-19 07:28
build_ext.py
12.86
KB
-rw-r--r--
2024-08-19 07:28
build_py.py
9.37
KB
-rw-r--r--
2024-08-19 07:28
develop.py
7.86
KB
-rw-r--r--
2024-08-19 07:28
dist_info.py
960
B
-rw-r--r--
2024-08-19 07:28
easy_install.py
85.16
KB
-rw-r--r--
2024-08-19 07:28
egg_info.py
24.22
KB
-rw-r--r--
2024-08-19 07:28
install.py
4.57
KB
-rw-r--r--
2024-08-19 07:28
install_egg_info.py
2.15
KB
-rw-r--r--
2024-08-19 07:28
install_lib.py
3.75
KB
-rw-r--r--
2024-08-19 07:28
install_scripts.py
2.38
KB
-rw-r--r--
2024-08-19 07:28
launcher manifest.xml
628
B
-rw-r--r--
2024-08-19 07:28
py36compat.py
4.87
KB
-rw-r--r--
2024-08-19 07:28
register.py
270
B
-rw-r--r--
2024-08-19 07:28
rotate.py
2.11
KB
-rw-r--r--
2024-08-19 07:28
saveopts.py
658
B
-rw-r--r--
2024-08-19 07:28
sdist.py
6.55
KB
-rw-r--r--
2024-08-19 07:28
setopt.py
4.97
KB
-rw-r--r--
2024-08-19 07:28
test.py
9
KB
-rw-r--r--
2024-08-19 07:28
upload.py
1.14
KB
-rw-r--r--
2024-08-19 07:28
upload_docs.py
7.14
KB
-rw-r--r--
2024-08-19 07:28
Save
Rename
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os import shutil from setuptools.extern import six from setuptools import Command class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N newest files" user_options = [ ('match=', 'm', "patterns to match (required)"), ('dist-dir=', 'd', "directory where the distributions are"), ('keep=', 'k', "number of matching distributions to keep"), ] boolean_options = [] def initialize_options(self): self.match = None self.dist_dir = None self.keep = None def finalize_options(self): if self.match is None: raise DistutilsOptionError( "Must specify one or more (comma-separated) match patterns " "(e.g. '.zip' or '.egg')" ) if self.keep is None: raise DistutilsOptionError("Must specify number of files to keep") try: self.keep = int(self.keep) except ValueError: raise DistutilsOptionError("--keep must be an integer") if isinstance(self.match, six.string_types): self.match = [ convert_path(p.strip()) for p in self.match.split(',') ] self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) def run(self): self.run_command("egg_info") from glob import glob for pattern in self.match: pattern = self.distribution.get_name() + '*' + pattern files = glob(os.path.join(self.dist_dir, pattern)) files = [(os.path.getmtime(f), f) for f in files] files.sort() files.reverse() log.info("%d file(s) matching %s", len(files), pattern) files = files[self.keep:] for (t, f) in files: log.info("Deleting %s", f) if not self.dry_run: if os.path.isdir(f): shutil.rmtree(f) else: os.unlink(f)