Skip to main content
# mydoglang 🐶
狗狗中文编程语言,一个简易中文脚本解释器。

> pip安装包名字:**mydoglang**
> Python导入模块名字:**mydoglang**

## 依赖
安装mydoglang会自动安装依赖库:
- mydoglib
- mycatlib

## 安装
```bash
pip install mydoglang
pip install mydoglib
pip install mycatlib

快速使用

from mydoglang import DogInterpreter

interp = DogInterpreter()

code = """
变量 a = 10
变量 b = 30
如果 a < b
    打印 "a小于b"
结束如果
打印 a
打印 b
"""

interp.run(code)

支持关键字

  • 变量:定义变量
  • 打印:输出内容
  • 如果:条件判断开头
  • 结束如果:条件判断结尾

支持运算比较

支持 > < ==

字符串需要用双引号包裹 "文本内容"

示例代码

from mydoglang import DogInterpreter

d = DogInterpreter()

demo = """
变量 狗狗 = 66
打印 "狗狗语言启动成功!"
打印 狗狗
如果 狗狗 == 66
    打印 "数值匹配"
结束如果
"""

d.run(demo)

注意

  • 当前仅支持单层 if,不支持嵌套如果
  • 字符串仅支持双引号 "内容"

Metadata

Release files for mydoglang 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mydoglang 1.0.2
File Size Uploaded Provenance Actions
mydoglang-1.0.2.tar.gz 2.6 kB Without provenance Details for mydoglang-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mydoglang 1.0.2
File Interpreter ABI Platform Actions
mydoglang-1.0.2-py3-none-any.whl Python 3 none any Details for mydoglang-1.0.2-py3-none-any.whl

Total release size: 5.4 kB

Release files / mydoglang-1.0.2.tar.gz

Download URL mydoglang-1.0.2.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d74dabf484303ea3b15921c227228dc87a90be5e9644e39648b386bfaece581f
BLAKE2b-256 checksum
How to use checksums
814ac568bf2190e0dc38b2942089ac008304937c73e654772db6b8c5ab53ce14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / mydoglang-1.0.2-py3-none-any.whl

Download URL mydoglang-1.0.2-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a71c8f55de0fee17ac2df4c08f9a287a12777b3a9c648b5bbacd16cb1840dac
BLAKE2b-256 checksum
How to use checksums
9c78b9742f7a0db5d295ab0e3e1c4a08b51263e3be71588557e0384365225cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for mydoglang 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page