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.4
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.4.tar.gz
(25.4 kB
view details)
Built Distribution
File details
Details for the file lib-not-dr-0.1.4.tar.gz
.
File metadata
- Download URL: lib-not-dr-0.1.4.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.8.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee521682a645d20d4d27ad8dd90a046e2696ed70b50a9f2f850720b7b1ab14b |
|
MD5 | d3f12d0d75e1e8ffe8f4569562ce1671 |
|
BLAKE2b-256 | 6152b290a99fa1c47bde555f97487152e3a835789e5ce6e2a35610b94623083a |
File details
Details for the file lib_not_dr-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: lib_not_dr-0.1.4-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.8.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ac5c866a8f14d6bd48b3c7b4d2a3165ca90db93c216f802701c9e2eb8c25c5 |
|
MD5 | 0d9d6599fbcf7b4d6f00bd635bdd666a |
|
BLAKE2b-256 | 02b05bc137321be995465f22d4e4125c512555fbc8366dccc30055f3c3e015bf |