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

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.3
File Size Uploaded Provenance Actions
mydoglang-1.0.3.tar.gz 2.6 kB Without provenance Details for mydoglang-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 5.4 kB

Release files / mydoglang-1.0.3.tar.gz

Download URL mydoglang-1.0.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
593e26682c3e38a5901e2dc9f885c2c8dc5943106ab104dd2658901fd738ec3e
BLAKE2b-256 checksum
How to use checksums
1875bd55b021be39f91e3e2272209d0afa900a62e1a7a14a2e83c0800a4699fa
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.3-py3-none-any.whl

Download URL mydoglang-1.0.3-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afc59149d7b1446aa7d3722319e377c3f99191d4abe8b7fd359a9ff4b841f81c
BLAKE2b-256 checksum
How to use checksums
54fa4bb1d65022339a4cabfbac7d28d0885821460f7d8f2b013d7b55f6060723
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.3

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