Run your python (.py) source file using F5
or F6
!
-
Add the directory of
python
(or the intended interpreter) toPATH
. -
Filter file extensions (unset by default) (optional)
- Open a source file.
- Hit
F5
orF6
to run.
- It will save the file in current editor immediately without a confirmation, be aware.
- Using
python
- Almost the same console with python IDLE, which provides syntax error and runtime error messages.
- CodeBlocks debug console style
- Shows return value and execution time
- It is a rough time based on real time rather than CPU kernel / user time
- Shows return value and execution time
-
Extension filter
- It accepts all extension by default (empty value), you can change it into
.py
- or an array
.py, .something-else
- or an array
- It accepts all extension by default (empty value), you can change it into
-
Command
- You can hack it using these variant, or
{file}
={dir}/{name}{ext}
- Run with interactive mode, or
python -i {file}
- Run with idle, and you may need the next setting.
pythonw C:\python27\Lib\idlelib\idle.pyw -r {file}
- You can hack it using these variant, or
-
Exit immediately
- You can disable the default cp wrapper if you don't want it.
-
Cross Platform Compatible
- Runs on Windows, Mac OS X, and Linux
-
True Arbitrary Execution
- Global python is the default interpreter
- Execute using any interpreter
- Pass options to the given interpreter
-
Python 2 and 3
- Note: If you have problems executing, you can install a global version of latest
python2.7.x
(even if you havepython3.x.x
installed). Please report anypython3
issues if you want to avoid installing a globalpython2
version.
- Note: If you have problems executing, you can install a global version of latest
-
The new version of atom-python-run fully supports logging.
- Please post these logs with along with issue you're experiencing.
- Note that there are two logs in case the latter fails. The first log is the console log and the second log is created by the cp main.py executable.
-
How to access Atoms Console Log
- Windows/Linux
- Ctrl + Shift + I
- Mac OS X
- Cmd + Alt + I
- Copy and paste the console output along with your post.
- Windows/Linux
-
How to access
cp
's built-in log- Windows
- Open file explorer
- Click the location bar (where the file path usually is)
- Type in
%userprofile%\.atom\packages\atom-python-run
- Locate, Open, and Copy the contents of the cp.log file along with your post.
- Mac OS X/Linux
- Open a terminal window.
$ cat ~/.atom/packages/atom-python-run/cp.log
- Copy and paste the contents along with your post.
- Open a terminal window.
- NOTE: If the
cp.log
file is missing, empty, or inaccurate, please note that this was case in your post.
- Windows
-
Detailed issues are well presented issues. This will help us locate your issue.
-
New an issue if you have any idea of new features.
This is a package for Atom