AbuLangModule - Complete AbuLang for Python IDLE
This module enables ALL AbuLang commands to work in Python IDLE with full syntax support.
Installation
# In Python IDLE
import sys
sys.path.append('path/to/AbuLangModule')
from AbuLangModule import *
Or install as package:
pip install -e AbuLangModule
Usage in IDLE
>>> from AbuLangModule import *
[AbuLang] Initializing AbuLang Module...
[AbuLang] ✓ Enabled!
[AbuLang] Available commands:
I/O: show, ask, input
Import: libra, library
Math: plus, minus, multi, divid, expon, modul, absof, sumup, avera
String: strip, lower, upper, replc, findt, lengt
System: pausi, exitp
File: readf, write
Type 'help_abulang()' for full command list
>>> show("Hello, AbuLang!")
Hello, AbuLang!
>>> x = 10
>>> y = 5
>>> show("Sum:", plus(x, y))
Sum: 15
>>> name = ask("Your name: ")
Your name: Abu
>>> show("Hello,", name)
Hello, Abu
>>> libra("math")
[AbuLang] Imported math
>>> show(math.sqrt(16))
4.0
Available Commands
I/O Commands
show(...)- Display outputask(prompt)- Get user input
Import Commands
libra(module)- Import library
Advanced Features (NEW!)
get_line(n, file)- Read specific line from filesave_as(file)- Save format buffer to fileswitch(format)- Multi-format blocks (yaml, json, csv)assign_compare(var, val, cmp)- Inverse walrus operator (=:)isolate(str, list)- Filter list by stringlocal(func).var- Access local variables from functionslocal_to_global(func, var)- Pull local variable to globalsave_local(func, var, val)- Save local variable
See ADVANCED_FEATURES.md for complete guide!
Math Commands
plus(a, b)- Add numbersminus(a, b)- Subtract numbersmulti(a, b)- Multiply numbersdivid(a, b)- Divide numbersexpon(a, b)- Power (a^b)modul(a, b)- Modulo (a%b)absof(x)- Absolute valuesumup(list)- Sum of listavera(list)- Average of list
String Commands
strip(text)- Remove spaceslower(text)- Lowercaseupper(text)- Uppercasereplc(text, old, new)- Replace textfindt(text, word)- Find substringlengt(text)- Length
System Commands
pausi(seconds)- Pause/sleepexitp()- Exit program
File Commands
readf(file)- Read filewrite(file, text)- Write file
AbuLang Packages
AbuSmart - System Utilities
>>> libra("AbuSmart")
>>> show(smart.time())
10:30:45
>>> show(smart.date())
2024-11-15
>>> smart.system_info()
=== System Information ===
...
AbuFILES - File Operations
>>> libra("AbuFILES")
>>> data = {"name": "Abu", "score": 100}
>>> files.save_data("mydata", data)
>>> loaded = files.load_data("mydata")
>>> show(loaded)
{'name': 'Abu', 'score': 100}
AbuINSTALL - Package Manager
>>> libra("AbuINSTALL")
>>> installer.check("requests")
✓ requests is installed
>>> installer.list_installed()
[List of packages...]
AbuChess - Chess AI
>>> libra("AbuChess")
>>> chess.info()
=== AbuChess - Neural Chess AI ===
...
>>> chess.AIweb() # Launch web interface
Complete Example
>>> from AbuLangModule import *
[AbuLang] Initializing AbuLang Module...
[AbuLang] ✓ Enabled!
>>> show("=== Calculator ===")
=== Calculator ===
>>> x = ask("First number: ")
First number: 10
>>> y = ask("Second number: ")
Second number: 5
>>> x = int(x)
>>> y = int(y)
>>> show("Sum:", plus(x, y))
Sum: 15
>>> show("Difference:", minus(x, y))
Difference: 5
>>> show("Product:", multi(x, y))
Product: 50
>>> show("Division:", divid(x, y))
Division: 2.0
>>> libra("math")
[AbuLang] Imported math
>>> show("Square root of x:", math.sqrt(x))
Square root of x: 3.1622776601683795
>>> libra("AbuSmart")
>>> show("Current time:", smart.time())
Current time: 10:30:45
Help
>>> help_abulang()
[Shows complete command list]
Disable AbuLang
>>> disable_abulang()
[AbuLang] Disabled
Notes
- In IDLE, you must use parentheses:
show("text") - For no-parentheses syntax, use .abu files:
python cli.py file.abu - All commands are added to Python's builtins
- Original builtins are preserved and can be restored
Requirements
- Python 3.8+
- PyYAML (for commands.yaml)
Optional:
- psutil (for battery info)
- pyperclip (for clipboard)
- opencv-python (for webcam)
- python-chess, torch, flask (for AbuChess)
Made with ❤️ by Abu
Metadata
Release files for AbuLangModule 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| abulangmodule-3.2.0.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abulangmodule-3.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / abulangmodule-3.2.0.tar.gz
| Download URL | abulangmodule-3.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21ab24536a5edfafa267b8018602368719f9d6c5f8f4ea54d1212e8f696ddbee
|
|
BLAKE2b-256 checksum How to use checksums |
cdc786f9e654446f52b6c8aa9aec8ddc113ecbe2e5b188f6dcc351066b53f73a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / abulangmodule-3.2.0-py3-none-any.whl
| Download URL | abulangmodule-3.2.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cac385d8884a6c8ef35d11b0e1210caee2b97cdb4276b20a8ff826164f16a550
|
|
BLAKE2b-256 checksum How to use checksums |
06fde52600c9fb9370723d36da53a10e1d3d9fdb2a3c526f18788c2857ecb035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for AbuLangModule 3.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.