Skip to content

karpuzkafa/Melon-Python-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Melon Library

Melon Library provides simple tools for creating terminal-based games.
Currently, it includes 6 tools.


Features

1. Print a Beautiful Line

No more manually using = or - symbols!

melon.whiteline()

2. Clear the Terminal

Clear the terminal without the os library:

melon.clear()

3. Check if a Number is Odd

Quickly check if a number is odd:

melon.is_odd(5)  # Output: True
melon.is_odd(2)  # Output: False

4. Run a Python File

A better way to run Python files:

Using subprocess:

subprocess.run(["python", "file.py"])

Using Melon Library:

melon.run("file.py")

5. Generate a Random Number

A simple alternative to the random library:

melon.randomize(1, 3)

6. Print text with hex color

A colored printer(may not work on all terminals)

melon.colorize("#ee00ff", "this is a purple colored text")

Enter string values please


Installation

You cant download this library with "pip install melon" Follow these steps to install the library:

  1. Download as a ZIP file.
  2. Unzip the file to /username123/melon.
  3. Open a terminal and run the following commands:
    cd melon
    python setup.py sdist bdist_wheel
    pip install .

Contact

If want contact with me: feedback5383@gmail.com


About

This is a Python library for making terminal games

Resources

License

Stars

Watchers

Forks

Languages