A python lib created from Difficult Rocket development
Project description
lib-not-dr
A python lib came from Difficult Rocket development
一个在 Difficult Rocket 开发中 分离出来的 python 库
Information/信息
- Version/版本: 0.1.8
Author/作者
License/许可证
安装/Install
pip install lib-not-dr
使用/Usage
Nuitka Compiler Helper
simple example 简单示例
import subprocess
from pathlib import Path
from lib_not_dr.nuitka.compile import CompilerHelper
compiler = CompilerHelper(src_file = Path("main.py"))
print(compiler)
subprocess.run(compiler.gen_subprocess_cmd())
more complex example 复杂示例
import sys
import subprocess
from pathlib import Path
from lib_not_dr.nuitka.compile import CompilerHelper
compiler = CompilerHelper(src_file = Path("main.py"), run_after_build=True)
print(compiler)
if '-y' in sys.argv or '--yes' in sys.argv:
do_run = True
elif '-n' in sys.argv or '--no' in sys.argv:
do_run = False
else: # do_run is None
while (do_run := input("compile? [y/n]").lower()) not in ["y", "n", "yes", "no"]:
pass
# 获取用户输入是否编译
# get user confirmation to compile or not
do_run = True if do_run[0] == "y" else False
if do_run:
subprocess.run(compiler.gen_subprocess_cmd())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lib-not-dr-0.1.8.tar.gz
(32.9 kB
view details)
Built Distribution
File details
Details for the file lib-not-dr-0.1.8.tar.gz
.
File metadata
- Download URL: lib-not-dr-0.1.8.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.10.0 CPython/3.8.18+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8449e10e125aa19d590ef6fd67c41ce8beba1da7fd3c4bbbe72e71130f38348d |
|
MD5 | 8db9c90e8981f0837335c3f62645ef40 |
|
BLAKE2b-256 | 66a2779fd2d5a0c4a1fe04001a6141342690c54a2367e5635fbf34d30d9cb794 |
File details
Details for the file lib_not_dr-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: lib_not_dr-0.1.8-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.10.0 CPython/3.8.18+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93eb6f28f3d905989aaafff5d234adc11197a5ffc822d51e3b15179d238580e9 |
|
MD5 | f5e951bb7a0c47d594c46143a7a76127 |
|
BLAKE2b-256 | 795dda0e754f79bbfdc55beeb5017b3e43a680502a66499aaa317200d1509f0a |