A modern Python extension language that adds powerful features while maintaining full compatibility with standard Python.
Python Compatibility: All PyNova code runs with standard Python Extended Syntax: Additional language constructs for cleaner code Enhanced Type System: More expressive type annotations Performance Optimizations: Special decorators for faster execution Safety Features: Built-in checks and validations System Integration: Better access to system-level functionality Installation Guide Prerequisites Python 3.6 or higher pip (Python package manager) Installation Steps Install PyNova using pip:
pip install pynova Verify installation:
pyn3 --version Add PyNova to your PATH (optional but recommended):
Download add_pynova_to_path_robust.bat from the repository
Run it to add PyNova to your user PATH environment variable
No administrator privileges required
Important Note About PyNova Launchers
Issues with command-line arguments Path resolution errors Elevation privilege problems ✅ Recommended: Use the pyn3.bat launcher which has been fixed and properly handles:
Command-line arguments Path resolution Automatic privilege elevation when needed Getting Started Create Your First PyNova Script Create a file named hello.pyn with the following content:
""" My first PyNova script """
print("Hello from PyNova!")
def calculate(x: num, y: num) -> num: """Calculate the sum of two numbers using PyNova's num type""" return x + y
def optimized_function(): """This function will be optimized by PyNova""" result = 0 for i in range(1000000): result += i return result
if name == "main": print(f"5 + 10 = {calculate(5, 10)}") print(f"Optimized result: {optimized_function()}") Run Your Script
pyn3 hello.pyn
python hello.pyn PyNova Tools and Examples The PyNova package includes several example applications:
Calculator: Multi-functional calculator with standard, scientific, and unit conversion features Bluetooth Emulator: Virtual Bluetooth environment for testing and development File Explorer: Enhanced file management with PyNova features Web Server: Simple HTTP server with PyNova optimizations File Extensions .pyn: Standard PyNova script files .pynb: PyNova notebook files (similar to Jupyter notebooks) .pyni: PyNova interface definition files Troubleshooting Common Issues Encoding Errors: If you see errors like 'charmap' codec can't decode byte..., use pyn3 instead of pyn or pyn2 Path Issues: If PyNova commands aren't recognized, run add_pynova_to_path_robust.bat Permission Errors: For scripts that need system access, use pyn3 --admin your_script.pyn Fixing Launcher Issues If you're experiencing issues with the launchers:
Use pyn3.bat instead of pyn.bat or pyn2.bat For scripts that never need admin privileges, use pyn3_simple.bat If you need to run with admin privileges, use pyn3 --admin your_script.pyn Documentation Full documentation is available at https://pynova.readthedocs.io/
##Community and Support GitHub: https://github.com/JJPEOPLES/Pynova Discord:Currently dont have Stack Overflow: Tag your questions with pynova ##License PyNova is released under the MIT License. See LICENSE file for details
PyNova is a programming language that extends Python with additional syntax and features while maintaining compatibility with the Python interpreter. This means you can run PyNova code directly with Python, but you get additional features when using the PyNova interpreter.
- Python Compatibility: All PyNova code is valid Python code
- Extended Syntax: PyNova adds new syntax elements that are ignored by Python
- Special Decorators: PyNova has special decorators for optimization and safety
- Enhanced Type System: PyNova extends Python's type annotations
- Documentation Features: PyNova has additional comment styles for documentation
This repository includes two example files that demonstrate PyNova syntax:
- pynova_features.pyn: Basic PyNova syntax features
- pynova_advanced.pyn: Advanced PyNova features implemented as Python code
You can run these files with either Python or the PyNova interpreter:
# Run with Python
python pynova_features.pyn
# Run with PyNova
pyn3 pynova_features.pynPyNova supports Python-style comments plus additional comment styles:
# Standard Python comment
## PyNova double-hash comment
#! PyNova warning comment
#> PyNova documentation commentPyNova has special function decorators (shown here as comments for Python compatibility):
# @pyn:fast # In actual PyNova code, this would be uncommented
def optimized_function():
# This function will be optimized by the PyNova JIT compiler
pass
# @pyn:safe
def safe_function():
# This function will have additional runtime checks
pass
# @pyn:export
def api_function():
# This function will be exposed in the module's public API
passWhen using the PyNova interpreter, you can uncomment these decorators. For Python compatibility, we keep them commented and use regular Python decorators instead.
PyNova extends Python's type annotations:
def calculate(x: num, y: num) -> num:
return x + y
def process_text(text: str!) -> str:
# The ! indicates non-nullable
return text.upper()
def get_items() -> list<str>:
# PyNova supports generic syntax with angle brackets
return ["item1", "item2"]PyNova has a special import syntax:
from @std import math
# The @ symbol indicates a built-in PyNova module
use math.advanced
# 'use' is an alternative to 'import'When you run PyNova code with Python, the PyNova-specific syntax is either:
- Ignored: Comments and string-based type annotations are ignored
- Interpreted as Python: Decorators are treated as variable references or function calls
- Implemented as Python: Special features are implemented as regular Python code
When you run PyNova code with the PyNova interpreter, the special syntax is recognized and provides additional features like optimization, safety checks, and enhanced type checking.
To create PyNova code that works with both Python and the PyNova interpreter:
- Use the
.pynfile extension - Make sure all PyNova-specific syntax is compatible with Python
- Implement PyNova features as regular Python code when needed
- Use string-based type annotations for PyNova types
This approach gives you the best of both worlds: your code will run with Python, but it will have additional features when run with the PyNova interpreter.