Skip to main content

A simple utility for creating directories.

Project description

use

path

from libtokit.path import mkdirs

def test_create_directory():
    test_path = "./test_dir/sub_dir"
    
    # 调用函数创建目录
    err, msg = mkdirs(test_path)
    # 检查目录是否创建成功
    assert err == False, f"目录创建失败 err: {err}!{msg}"
    assert os.path.exists(test_path), "目录创建失败!"
    # 清理测试目录
    os.removedirs(test_path)

oj call

from libtokit.call import Judger

def main():
    result = Judger.run(
        max_cpu_time=1000,
        max_real_time=3000,
        max_memory=128 * 1024 * 1024,
        max_stack=128 * 1024 * 1024,
        max_output_size=1024 * 1024,
        max_process_number=UNLIMITED,
        exe_path='/path/to/executable',
        input_path='/path/to/input',
        output_path='/path/to/output',
        error_path='/path/to/error',
        args=['arg1', 'arg2'],
        env=['ENV_VAR=value', 'ANOTHER_VAR=another_value'],
        log_path='/path/to/log',
        seccomp_rule_name='default',
        uid=1000,
        gid=1000,
        debug=True,
    )
    print(f'Result: {result}')

oj parse

from libtokit.parse import parse_json, parse_yaml


def main():
    xml_file = 'test.xml'  # 替换为实际 XML 文件路径
    parser = ProblemParser(xml_file)  # 初始化解析器
    parser.parse()  # 解析 XML 文件
    parsed_data = parser.to_json()  # 转换为 JSON 格式
    if parsed_data:
        print(parsed_data)  # 打印 JSON 数据

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

t3tokit-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

t3tokit-0.1.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file t3tokit-0.1.1.tar.gz.

File metadata

  • Download URL: t3tokit-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for t3tokit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 116a9efe2dd3e603c4c367d1b2d5125bdafeed0ccfa7b2591f013325634a9a96
MD5 7c09c308bd3a8493b1323e2cfb7d2f6e
BLAKE2b-256 82c20191c53b13fb77cebd4daf96c38edcf4bc094e83e42669b86b8cdf5bbb71

See more details on using hashes here.

File details

Details for the file t3tokit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: t3tokit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for t3tokit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2faef4f9c41dd1a50966ecdb2cf74797fafcd83541a92ab55c44366961f61c13
MD5 9e1d007cde2f57ec887a5eda07cc1860
BLAKE2b-256 09e6b27f5020238a5cc9604496d48fa45f429040d4f580133c9af8cd60ddc777

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page