chore: remove redundant .pythonrc file
This commit is contained in:
27
.pythonrc
27
.pythonrc
@@ -1,27 +0,0 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
os.environ["MPLBACKEND"] = "kitcat"
|
||||
|
||||
def new_cell(cell_path: str):
|
||||
cell_path = Path(cell_path)
|
||||
state = Path(".state")
|
||||
cell_number = 0
|
||||
|
||||
if state.exists():
|
||||
cell_number = state.read_bytes()
|
||||
cell_number = int.from_bytes(cell_number) + 1
|
||||
state.write_bytes(cell_number.to_bytes())
|
||||
|
||||
save_path = cell_path.with_stem(cell_path.stem + '_' + str(cell_number))
|
||||
cell_path.rename(save_path)
|
||||
|
||||
|
||||
|
||||
def prun(path):
|
||||
if not os.path.exists(path):
|
||||
print(f"Cell not found: {path}")
|
||||
return
|
||||
with open(path, "rb") as f:
|
||||
print(exec(compile(f.read(), path, 'exec'), globals()))
|
||||
|
||||
Reference in New Issue
Block a user