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.4

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.4
File Size Uploaded Provenance Actions
mydoglang-1.0.4.tar.gz 2.5 kB Without provenance Details for mydoglang-1.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 5.2 kB

Release files / mydoglang-1.0.4.tar.gz

Download URL mydoglang-1.0.4.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7bac5f15cf5e3f3896900a98ba6c11a408ca1790ea85e2934129673acbb466aa
BLAKE2b-256 checksum
How to use checksums
db838649891e38615adf2e8e605633c537e875d932f4675261c0ca66b68b6a72
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.4-py3-none-any.whl

Download URL mydoglang-1.0.4-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feddb0cf12e398a659ae29596cb5ea5aea6903f2127162efdf6879539f83b9d7
BLAKE2b-256 checksum
How to use checksums
b14f3ec67eccdd60a18c80f4a9b4921347197d4ca6251484a0c3f46158011262
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.4

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