A Python addon that makes the interpreter experience better
Welcome | Installation | Usage | Help | Common Issues | Website
Left Pyrun, Right Standard Python Interpreter
PyRun is an innovative command-line tool designed to streamline Python development by enhancing error handling and debugging processes. Built to assist both novice and experienced developers, PyRun offers an intuitive interface for running Python scripts while providing detailed feedback on any errors encountered during execution. Key Features:
- Automatic Error Detection: PyRun runs your Python scripts and captures any errors that arise, generating a comprehensive report that highlights the exact lines of code causing issues.
- Syntax Highlighting: Error reports are formatted with syntax highlighting for easy readability, allowing developers to quickly identify and understand their mistakes.
- Contextual Information: Alongside error details, PyRun provides the surrounding lines of code, giving developers the necessary context to effectively troubleshoot problems.
- [NOT RELEASED] Test Case Management: Users can create and run test cases against their scripts, ensuring that their code behaves as expected under various scenarios.
- Customizable Command-Line Options: PyRun supports various arguments to tailor its functionality, making it adaptable to different development workflows.
- Python: Version 3.6 or higher
- You can install Python from python.org.
- pip: Python package manager (included with Python installation)
- Check if pip is installed by running:
pip3 --version
- Check if pip is installed by running:
- Dependencies: This project requires the following Python libraries:
pygments
(install script will prompt installation)
NOTE: for deletion, you have to run this command again or run 'sudo py --del'
curl -s -o install.sh https://raw.githubusercontent.com/sjapanwala/pyrun/refs/heads/main/unix/install.sh && bash install.sh
NOTE: Windows isnt the primary focus. As many functions may work, its not promised it will be a seamless experience without bugs and issues
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sjapanwala/pyrun/refs/heads/main/windows/install.cmd" -OutFile "install.cmd"; .\install.cmd
Using Pyrun is super simple, instead of typing python, or python3 everytime you go to run your python file.
We Have Our Python Script To Run (super simple file)...
def divide(x,y):
return x / y
result = divide(5,0)
print(result)
When we are ready to run the script, we can run the command in our terminal like so...
$ filename.py
Since we have an obvious mathematical error of dividing by 0, we receive an output like this...
this shows us exaclty where the error takes place, there is an error in the function
diviede
because in the functiondivide
you are dividing by zero, as shown by the red underline
- Pyrun is super simple to many, your doing the same amount of work running your scripts, but your getting more of the output you deserve. say goodbye to the debug struggle!
some questions can by answered by running py help
, try that before opening an issue...
if you have a question not listed here, please open an Issue , and we will resolve it ASAP
this is the table we ended with from out tests.
- That was a common concerns amongs the developers aswell, we tested that theory with multiple sorting algorithms and logged how long it took, running 100 tests on each algorithms, with the same arrays, keeping all the factors the same. We saw that there was no drastic difference, if anything, Pyrun was running faster. This result also depends on the specs of your machinery.
- If you would like to change the prefix, you would have to alter the
install.sh
file.- Run the install command, but abort it with
ctrl + c
. - Using a text editior of your choice, change the
$TARGET_PATH
change thepy
to the prefix of your choice.
Keep in mind: since the prefix is changes, every command you run,
py
will need to be substituted with the prefix of your choice - Run the install command, but abort it with
- Please Visit The Config Docupages For More Information
- You can update straight from the program by running
sudo py --new
For Information Needed After Download
-
An issue found is, when you need to delete or update the program, since the name was changed, the path is not recognized anymore.
-
We understand this isnt a good solution. as we work around this, this is the only way
Easy Fix
# to delete the program, run
$ sudo rm /usr/local/bin/<thenameyougave>
# to update, you may just need to reinstall the program
$ curl -s -o install.sh https://raw.githubusercontent.com/sjapanwala/pyrun/refs/heads/main/unix/install.sh && bash install.sh