Skip to main content

Sample App for ProcyonCLS | For Developers

 import sys


folder1_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

sys.path.insert(0, folder1_path)


import kernel

import ekernel


def main():

    if len(sys.argv) == 3:

        if sys.argv[1] == "0.9L":

            if sys.argv[2] == "False":

                ekernel.splashScreen("App Sample for ProcyonCLS", "Version 0.9L Compatible App 0.1")

                ekernel.printHeader("Sample")

                kernel.println("Hello, World!")

                ekernel.prettyPrint("Hello, World!")

                kernel.println("Admin Status : False")

                # Need new admin access from admin()

                kernel.printInfo("This is information text")

                kernel.printError("This is error text")

                kernel.printWarning("This is warning text")

                kernel.printSuccess("This is success text")

                kernel.println("This is normal text")

            else:

                # Admin Access True

                ekernel.splashScreen("App Sample for ProcyonCLS", "Version 0.9L Compatible App 0.1")

                ekernel.printHeader("Sample")

                kernel.println("Hello, World!")

                ekernel.prettyPrint("Hello, World!")

                kernel.println("Admin Status : True")

                # Already run as admin, no need for new request

                kernel.printInfo("This is information text")

                kernel.printError("This is error text")

                kernel.printWarning("This is warning text")

                kernel.printSuccess("This is success text")

                kernel.println("This is normal text")

        else:

            kernel.printError("Incompatible kernel")

    else:

        kernel.printError("OS Scope Error")


if __name__ == "__main__":

    main()

Comments

Popular posts from this blog

Developing a simple Linux Distro from scratch using Busybox

Greetings, and welcome to my blog. Today, I will discuss how to create a simple Linux distribution using BusyBox . This can be done on any system, whether it is Windows, macOS, or Linux. For Windows, you need WSL, a Docker (Ubuntu) container, or a VM with a Linux distribution installed (Ubuntu or its derivatives are recommended). First, install the prerequisites: Note : If you are using a container, ensure you run it in privileged mode. Bash sudo apt install bc cpio bison libssl-dev libncurses-dev libelf-dev bzip2 make sudo apt install automake autoconf git syslinux dosfstools xz-utils build-essential gcc wget Once you have these dependencies installed, start by creating a directory named distro : Bash sudo mkdir /distro cd /distro After creating and changing the directory, obtain the Linux Kernel, either from git or wget: Note : If you use git, you might clone the beta or release candidate version of the kernel. Bash sudo git clone --depth 1 https://github.com/torvalds/linux OR...

Windows Whistler: The Birth of Windows XP

 In the early 2000s, Microsoft embarked on a mission to unify its consumer and business operating systems into a single, versatile platform. This mission led to the creation of Windows Whistler , a project that would eventually evolve into the widely acclaimed Windows XP . Let's explore the journey of Windows Whistler and its significance in the world of computing. The Genesis of Whistler Windows Whistler was born out of the need to merge two separate projects: Windows Odyssey and Windows Neptune . Odyssey was aimed at business users, building on the stability and security of Windows 2000, while Neptune targeted home users with a more user-friendly interface. Recognizing the potential benefits of combining these efforts, Microsoft decided to merge the two projects into a single codebase, codenamed Whistler. Key Features and Innovations Whistler introduced several groundbreaking features that would later become hallmarks of Windows XP: Unified Codebase : By merging Odyssey and Nept...

Why I developed ProcyonCLS?

Initially, I created this project four years ago as a way to learn Python. At that time, it wasn't named ProcyonCLS or DonutCLS; I simply referred to it as Simple CLI. As I continued to learn, I renamed it Py-DOS, even though it wasn't an actual operating system. Eventually, I stopped working on it, thinking it was pointless—after all, who uses a CLI application that does nothing in the age of GUIs? However, last month, after completing my final exam for the third semester of my BCA degree, I revisited the project out of boredom. This time, instead of a single Python file, I developed a bootloader, kernel, and shell to demonstrate to some friends the basics of how a real operating system functions. It wasn't a true OS, but it served as a useful illustration. Later, I decided to upload it to my GitHub, regardless of whether it would be used or not. The first GitHub release of ProcyonCLS was version 0.5, back when the release name '2025' had not been established, and ...