File | Date | Author | Commit |
---|---|---|---|
.github | 2023-10-27 | Pabitra Banerjee | [1f6fa9] Update issue templates |
.vscode | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
__pycache__ | 2023-10-27 | Pabitra Banerjee | [a05609] Documentation Updates |
CODE_OF_CONDUCT.md | 2023-10-27 | Pabitra Banerjee | [879ecf] Create CODE_OF_CONDUCT.md |
CONTRIBUTING.md | 2023-10-27 | Pabitra Banerjee | [51ae63] Create CONTRIBUTING.md |
LICENSE | 2023-10-27 | Pabitra Banerjee | [30fc47] Create LICENSE |
PyConda.py | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
README.md | 2023-10-27 | Pabitra Banerjee | [9db4f8] Adding README.md |
SECURITY.md | 2023-10-27 | Pabitra Banerjee | [869080] Create SECURITY.md |
example.css | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
example.pc | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
grammer.txt | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
shell.py | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
strings_with_arrows.py | 2023-10-27 | Pabitra Banerjee | [0e9ee7] initial commit |
PyConda is a simple, Python-based programming language designed for ease of use and extensibility. With PyConda, you can write and execute code in a straightforward and intuitive manner. This README provides an overview of the project, example code, example output, rules of execution, and how to run external files.
PyConda is an interpreted programming language that combines the simplicity of Python with custom features. It allows you to define functions, control flow, and perform operations easily. This README introduces the project and provides instructions on how to use it.
# This is a very useful piece of software
FUN oopify(prefix) -> prefix + "oop"
FUN join(elements, separator)
VAR result = ""
VAR len = LEN(elements)
FOR i = 0 TO len THEN
VAR result = result + elements/i
IF i != len - 1 THEN VAR result = result + separator
END
RETURN result
END
FUN map(elements, func)
VAR new_elements = []
FOR i = 0 TO LEN(elements) THEN
APPEND(new_elements, func(elements/i))
END
RETURN new_elements
END
PRINT("Greetings universe!")
FOR i = 0 TO 5 THEN
PRINT(join(map(["l", "sp"], oopify), ", "))
END
When you run the example code provided above, you can expect the following output:
Greetings universe!
loop, soop
loop, soop
loop, soop
loop, soop
loop, soop
This output demonstrates the use of functions, loops, and print statements in PyConda.
FUN
keyword.FOR
, IF
, and WHILE
.VAR
keyword.[]
, and you can access elements using square brackets (e.g., my_list[0]
).RUN
function.To execute external PyConda code files, follow these steps:
Open a terminal or command prompt.
Navigate to the directory containing your PyConda files, including shell.py
and the PyConda code files (e.g., "example.pc").
Run the PyConda shell by executing the following command:
shell
python shell.py
You'll enter an interactive PyConda shell. To execute an external file, use the RUN
command, like this:
shell
PyConda > RUN("example.pc")
The code in the external file will be executed, and the results will be displayed.
Feel free to explore PyConda and create your own programs with it. If you encounter any issues, have questions, or want to contribute to the project, please reach out to the developer. Happy coding!