Menu

Tree [aa5b03] main 1.0.0 /
 History

HTTPS access


File Date Author Commit
 .github 2023-10-27 Pabitra Banerjee Pabitra Banerjee [1f6fa9] Update issue templates
 .vscode 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 __pycache__ 2023-10-27 Pabitra Banerjee Pabitra Banerjee [a05609] Documentation Updates
 CODE_OF_CONDUCT.md 2023-10-27 Pabitra Banerjee Pabitra Banerjee [879ecf] Create CODE_OF_CONDUCT.md
 CONTRIBUTING.md 2023-10-27 Pabitra Banerjee Pabitra Banerjee [51ae63] Create CONTRIBUTING.md
 LICENSE 2023-10-27 Pabitra Banerjee Pabitra Banerjee [30fc47] Create LICENSE
 PyConda.py 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 README.md 2023-10-27 Pabitra Banerjee Pabitra Banerjee [9db4f8] Adding README.md
 SECURITY.md 2023-10-27 Pabitra Banerjee Pabitra Banerjee [869080] Create SECURITY.md
 example.css 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 example.pc 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 grammer.txt 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 shell.py 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit
 strings_with_arrows.py 2023-10-27 Pabitra Banerjee Pabitra Banerjee [0e9ee7] initial commit

Read Me

PyConda - A Python-Based Programming Language

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.

Table of Contents

Introduction

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.

Example Code

# 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

Example Output

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.

Rules of Execution

  • PyConda is line-based and uses indentation to define blocks of code, similar to Python.
  • You can define functions using the FUN keyword.
  • Control flow statements include FOR, IF, and WHILE.
  • Variables are declared using the VAR keyword.
  • Lists are enclosed in square brackets [], and you can access elements using square brackets (e.g., my_list[0]).
  • External code can be executed using the RUN function.

Running External Files

To execute external PyConda code files, follow these steps:

  1. Open a terminal or command prompt.

  2. Navigate to the directory containing your PyConda files, including shell.py and the PyConda code files (e.g., "example.pc").

  3. Run the PyConda shell by executing the following command:
    shell python shell.py

  4. You'll enter an interactive PyConda shell. To execute an external file, use the RUN command, like this:
    shell PyConda > RUN("example.pc")

  5. The code in the external file will be executed, and the results will be displayed.

Developer Details

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!