规范路径命名
This commit is contained in:
12
skills/python-runner/scripts/get_temp_path.py
Normal file
12
skills/python-runner/scripts/get_temp_path.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# /// script
|
||||
# dependencies = []
|
||||
# ///
|
||||
|
||||
import tempfile
|
||||
|
||||
temp_dir = tempfile.gettempdir()
|
||||
temp_file_path = tempfile.NamedTemporaryFile(
|
||||
mode="w", suffix=".py", prefix="uv_script_", dir=temp_dir, delete=False
|
||||
).name
|
||||
|
||||
print(temp_file_path)
|
||||
Reference in New Issue
Block a user