Skip to content

Commit

Permalink
0.8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
EcmaXp committed Feb 24, 2024
1 parent dcd6ae5 commit f878e54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[tool.poetry]
name = "reloader.py"
version = "0.8.7"
version = "0.8.8"
description = "A simple script reloader"
license = "MIT"
authors = ["EcmaXp <ecmaxp@ecmaxp.kr>"]
repository = "https://github.com/EcmaXp/reloader.py"
packages = [
{include = "reloader.py"},
]
packages = [{ include = "reloader.py" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
Expand Down
9 changes: 6 additions & 3 deletions reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import ast
import inspect
import linecache
import subprocess
import sys
import traceback
from collections import Counter
Expand All @@ -28,7 +27,7 @@
from watchdog.observers import Observer

__author__ = "EcmaXp"
__version__ = "0.8.7"
__version__ = "0.8.8"
__license__ = "MIT"
__url__ = "https://pypi.org/project/reloader.py/"

Expand Down Expand Up @@ -454,6 +453,10 @@ def execute(self):
parser.add_argument("argv", nargs=argparse.REMAINDER)


def clear():
print(end="\x1b[2J\x1b[H", flush=True)


def main():
args = parser.parse_args()
script_path = args.script.resolve()
Expand All @@ -463,7 +466,7 @@ def main():
auto_reloader = auto_reloader_cls(script_path)

if args.clear:
auto_reloader.on_reload = lambda reloader: subprocess.call(["clear"])
auto_reloader.on_reload = lambda reloader: clear()

auto_reloader.execute()

Expand Down

0 comments on commit f878e54

Please sign in to comment.