codepaste 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
codepaste/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
_dir = Path(__file__).parent / "files"
|
|
4
|
+
|
|
5
|
+
print("codepaste: use ls() to list files, cat('name') to print contents")
|
|
6
|
+
|
|
7
|
+
def cat(name: str):
|
|
8
|
+
matches = list(_dir.glob(f"{name}.*"))
|
|
9
|
+
if not matches:
|
|
10
|
+
print(f"'{name}' not found. available: {ls()}")
|
|
11
|
+
return
|
|
12
|
+
print(matches[0].read_text(encoding="utf-8"))
|
|
13
|
+
|
|
14
|
+
def ls():
|
|
15
|
+
return [f.stem for f in _dir.iterdir()]
|
codepaste/files/test2.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
codepaste/__init__.py,sha256=dQg2F7fHXAP16wbXhj5f5ExDYGxiuphOMgMMiOYpFpA,403
|
|
2
|
+
codepaste/files/test2.py,sha256=jt4Cf8klhGCfRLt6kamHE58TdRwwzD4vw_SgAv2dOlg,68
|
|
3
|
+
codepaste-0.0.0.dist-info/METADATA,sha256=f2d6aTL7AtmV3QzwYZuhg9_7Kj2nAIX6j8cNdDTXlYo,53
|
|
4
|
+
codepaste-0.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
+
codepaste-0.0.0.dist-info/top_level.txt,sha256=LcbiItAsDoobYHjKiME_Qub0ojYrSMTbwBAn28Moe6o,10
|
|
6
|
+
codepaste-0.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
codepaste
|