Basic Usage
How to run
You can run PyCN code using executable binary file, Node.js/Web WASM pack, dynamic link library or through http API.
How to build: See this section
Write your first PyCN program
Let's get started with 「Hello, world!」program.
- Create a
你好.pycn(which meanshello.pycn) file.
pycn
# print("Hello, world!")
打印("你好,世界!")- Run with pycn CLI:
shell
pycn run 你好.pycnInteract with Python virtualenvs
Worrying about abilities? PyCN is able to interact with virtualenvs created by pip, poetry and etc. Please notice that the run command is something different now.
shell
# poetry
PYTHONPATH=.venv/lib/python<VERSION>/site-packages pycn run ./包管理器测试.pycn
# pip
PYTHONPATH=venv/lib/python<VERSION>/site-packages pycn run ./包管理器测试.pycnExamples
I've given some examples for you to know more about Pycn:
