Online Python Script Runner

Your choice

If you attempt to access a Python script on a site using the Apache webserver software and simply see the Python code, you may need to place the script in a cgi-bin directory, if you wish to use the Common Gateway Interface (CGI) method of running scripts - see HOWTO Use Python in the web for drawbacks of using this method, though it may be the simplest way to run such scripts on a web site. Online Python is a web-based tool to run Python scripts/codes online. It provides a platform-independent Python IDLE & and compiler that enables you to run Python scripts in mobile, tablet, laptop, desktop PC, etc. In a wide range of operating systems including (but not limited to): iOS, Android, Windows, Mac, etc. If your script/program accepts inputs from a user, please enter inputs in the STDIN box above and then run your code. Enter each input on a separate line; Click on the copy button to copy your code; Click on the button to change the theme of an editor; Use this editor to practice Python online with our free Python Exercises. Python Compiler (Editor) With our online Python compiler, you can edit Python code, and view the result in your browser. Edit the code and click on the 'Run. How To Run Python Scripts From the Command Line › Discover The Best Online Courses www.opensourceoptions.com Courses. Posted: (1 day ago) Jul 15, 2021 Creating Python scripts that can be run from the command line makes it much easier to abstract and share your code so that it can be reused and shared with others.

We have quickstart installers for Django, web2py, Flask, and Bottle — we can also handle any other WSGI web framework that you want to use, and it's probably already installed.

Runner

Migrated to @pythonanywhere -- simplest & hassle free hosting for Django apps! https://t.co/tZgz6VkXCG

— Barun Saha (@1barun) October 12, 2017

Day 44 #100DaysOfCode : Learnt to host django website on pythonanywhere. @pythonanywhere - you guys are awesome... took just 10 min to host a website... - snappy live website.. Ping me for any suggestion/error..

— Chandramowli J (@ChaMowJack) October 10, 2017

There is no easier Python hosting experience, IMHO.

— Paul Barry (@barrypj) July 31, 2017How to run python code

wow deploying a django app to @pythonanywhere was very easy, nice service

— Pybites (@pybites) July 18, 2017

Launched another site on @pythonanywhere using #Flask, they couldn't make it any easier!

— SeekWell (@SeekWell_io) June 23, 2017

With #web2py + #pythonanywhere was actually really easy to deploy a WebApp.

— Kristian Kanchev (@KanchevKristian) May 1, 2017

@pythonanywhere Great initiative. Amazing service! Good job! Quickly host python apps with complete python environment! With free plan

— Tiago Marques (@tapmarques) February 14, 2017

Gotta love how easy it is to stand up a Django web app with @pythonanywhere

Online— Kevin Earl Denny (@kevinearldenny) January 17, 2017

I'm in love with @pythonanywhere.
Deploying my python projects have never been easier.

— Fadilullah (@__olamilekan__) December 1, 2016

@pythonanywhere best hosting ever!!!

— Buczacka Walter (@DeWalltt) November 11, 2016Runner

Down tools. Move over to @pythonanywhere with their game changing support. The only guys in town when it comes to #Django #Python

— Robert Johnstone (@reliableitsys) October 21, 2016

Anaconda from @ContinuumIO + @pythonanywhere + @github = great way to learn webdev w/ Flask. Make your teacher a mentor online. Geek out!

— Kirby Urner (@4DsolutionsPDX) July 31, 2016

@pythonanywhere is the real deal when it comes to web hosting; so easy getting your site up and running. #kickass

— George Thomas (@tibugeorge) 9 June 2016

Have been playing around with #Python (3.5) and #Django on @pythonanywhere. Very, very cool and powerful!

— J. M. Varner (@JMVarnerBooks) 6 June 2016

Thanks @pythonanywhere for making it so easy to dploy our site Built using @django and deployed via @GitHub in <8hrs

— Solid State Design (@solstatdes) 5 April 2016

Just setup a Django website using the wonderful workflow on @pythonanywhere with none of that painful server and backend stuff!!

— Doris Lee (@dorisjlee) 29 March 2016

I discovered @pythonanywhere today and in less than 10 minutes I had my app running. I'm excited.

— Vuyisile Ndlovu (@TerraMeijar) 25 December 2015

I've being playing on @pythonanywhere the whole day. #python #django developers I recommend you to join. It's easy to set up and really good

— Jorge A. Díaz Orozco (@jadolg91) 22 December 2015

Discovered @pythonanywhere today. Brilliant way to host your app in under 5 mins. @architv07 @skd1810 @dhruvagga

— Prempal Singh (@prempal42) 14 December 2015

@pythonanywhere is awesome, takes only minutes to get started with a simple app and that too with Python 3.4!

— Sourav Datta (@sourav_datta) 10 June 2015

Tried to host my django code on my debian vps with apache… Hours of poking around. Tried @pythonanywhere, and it was live in minutes.

— Philippe Lemaire (@plemaire_) 22 May 2015

so @pythonanywhere is awesome; got a REST API in Flask up and running in no time

— James Milner (@JamesLMilner) 17 May 2015

@pythonanywhere You guys rock! It was so easy to get a basic #django 1.8 project up and running. Thanks!

— Dave O'Connor (@DJOconnor3) 12 May 2015

Run code in Atom!

Run scripts based on file name, a selection of code, or by line number.

Currently supported grammars are:

GrammarFile BasedSelection BasedRequired PackageRequired in PATHNotes
Assembly (NASM)YesYeslanguage-x86-64-assemblynasm, binutils
1C (BSL)Yeslanguage-1c-bsloscript
AnsibleYeslanguage-ansibleansible-playbook
AutoHotKeyYesYeslanguage-autohotkeyAutoHotKey.exe
AppleScriptYesYeslanguage-applescriptosascript
BabelES6 JSYesYeslanguage-babelnode
BashYesYesRuns if your SHELL or #! line is bash.
Bats (Bash Automated Test System)YesYeslanguage-batsbats
Windows Batch (cmd.exe)Yeslanguage-batch/file
BehatYesbehat-atombehat
BuckleScriptYesYesbs-platformbsc
CYesYesxcrun clang/ccAvailable only on macOS and Linux.
C#YesYescsc.exe
C# ScriptYesYesscriptcs
C++YesYesxcrun clang++/g++Available only on macOS and Linux. Run with -std=c++14.
ClojureYesYeslein execRequires Leiningen with the lein-exec plugin.
CoffeeScript (Literate)YesYescoffee
CrystalYesYeslanguage-crystal-actualcrystal
Cucumber (Gherkin)Yeslanguage-gherkincucumber
DYesYeslanguage-drdmd
DartYesYesdartlangdart
DOT (Graphviz)YesYeslanguage-dotdot
ElixirYesYeslanguage-elixirelixir
ErlangYeslanguage-erlangerlLimited selection based runs only (see #70).
F*Yesatom-fstarfstar
F#Yeslanguage-fsharpfsharpi/fsi.exe
FishYesYeslanguage-fish-shellfish
ForthYeslanguage-forthgforth
FortranYeslanguage-fortrangfortran
GnuplotYeslanguage-gnuplot-atomgnuplot
GoYesgo
GroovyYesYeslanguage-groovygroovy
Haskell (Literate)YesYeslanguage-haskellrunhaskell/ghc
HTMLYesOpens the current HTML file in your default browser.
HyYesYeslanguage-hyhy.exe
IcedCoffeeScriptYesYeslanguage-iced-coffee-scripticed
Inno SetupYeslanguage-innosetupISCC.exe
IdrisYeslanguage-idrisidris
ioYesYesatom-language-ioio
JavaYes*jdk1.x.x_xxbinProject directory should be the source directory; subfolders imply packaging.
JavascriptYesYesnode
JavaScript for Automation (JXA)YesYeslanguage-javascript-jxaosascript -l JavaScriptAvailable on macOS only.
JolieYeslanguage-joliejolie
JuliaYesYeslanguage-juliajulia
KotlinYesYeslanguage-kotlinkotlinc
LAMMPSYeslanguage-lammpslammpsAvailable only on macOS and Linux.
LaTeXYeslanguage-latexlatexmk
LilyPondYesatlilypondlilypond
LispYesYeslanguage-lispsbclSelection based runs are limited to a single line.
LiveScriptYesYeslanguage-livescriptlsc
LuaYesYeslanguage-lua[-wow]lua
MakefileYesYes
MATLABYesYeslanguage-matlabmatlab
MIPSYeslanguage-mipsspim
MongoDBYesYeslanguage-mongodbmongo
MoonScriptYesYeslanguage-moonscriptmoon
NCLYesYeslanguage-nclnclScripts must end with an exit command for file based runs.
newLISPYesYeslanguage-newlispnewlisp
Nim[Script]Yeslanguage-nimnim
NSISYesYeslanguage-nsismakensis
Objective-C[++]Yesxcrun clang[++]Available on macOS only.
OCamlYeslanguage-ocamlocaml
OctaveYesYeslanguage-matlaboctave
OzYesYeslanguage-ozozc
Pandoc MarkdownYeslanguage-pfmpanzer
PascalYesYeslanguage-pascalfpc
PerlYesYes
PHPYesYes
PostgreSQLYesYeslanguage-pgsqlpsqlConnects as user PGUSER to database PGDATABASE. Both default to your operating system's USERNAME, but can be set in the process environment or in Atom's init file: process.env.PGUSER = {user name} and process.env.PGDATABASE = {database name}
POV-RayYesatom-language-povraypovengine/povray
PowerShellYesYeslanguage-powershellpowershell
ProcessingYesprocessing-languageprocessing-java
PrologYeslanguage-prologswiplScripts must contain a rule with the head main (e.g.main:- parent(X,lucas),writeln(X).). The script is executed with the goal main and exits after the first result is found. The output is produced by the writeln/1 predicates.
PureScriptYeslanguage-purescriptpulp
PythonYesYes
RYesYeslanguage-rRscript
RacketYesYeslanguage-racketracket
RakuYesYesraku
ReasonYesYeslanguage-reasonrebuild
Ren'PyYesNolanguage-renpyrenpyRuns your project at the root of the current file.
Robot FrameworkYesNolanguage-robot-frameworkrobotThe output location depends on the CWD behaviour which can be altered in settings.
RSpecYesYeslanguage-rspecrspec
RubyYesYes
Ruby on RailsYesYes
RustYeslanguage-rustrustc
SageYesYeslanguage-sagesage
Sass/SCSSYessass
ScalaYesYeslanguage-scalascala
SchemeYesYeslangauge-schemeguile
Shell ScriptYesYesSHELLRuns according to your default SHELL, or #! line.
Standard MLYeslanguage-smlsml
StataYesYeslanguage-statastata
SwiftYeslanguage-swiftswift
TclYesYeslanguage-tcltktclsh
TypeScriptYesYests-node
VBScriptYesYeslanguage-vbscriptcscript
ZshYesYesRuns if your SHELL or #! line is zsh.

NOTE: Some grammars may require you to install a custom language package.

You only have to add a few lines in a PR to support another.

Installation

apm install script

or

Search for script within package search in the Settings View.

Atom can't find node | ruby | python | my socks

Make sure to launch Atom from the console/terminal. This gives atom all your useful environment variables. Additionally, make sure to run it with the project path you need. For example, use

to get it to run with the current directory as the default place to run scripts from.

If you really wish to open atom from a launcher/icon, see this issue for a variety of workarounds that have been suggested.

Usage

Make sure to run atom from the command line to get full access to your environment variables. Running Atom from the icon will launch using launchctl's environment.

Script: Run will perform a 'File Based' run when no text is selected (default).

Script: Run while text is selected will perform a 'Selection Based' run executing just the highlighted code.

Script: Run by Line Number to run using the specified line number. Note that if you select an entire line this number could be off by one due to the way Atom detects numbers while text is selected.

Script: Configure Script should be used to configure command options, program arguments, and environment variables overrides. Environment variables may be input into the options view in the form VARIABLE_NAME_ONE=value;VARIABLE_NAME_TWO='other value';VARIABLE_NAME_3='test'.

Also, in this dialog you can save options as a profile for future use. For example, you can add two profiles, one for python2.7 and another for python3 and run scripts with a specified profile, which will be more convinient than entering options every time you want to switch python versions.

Change Default Language by opening Atom Settings as follows: Atom→Preferences→Open Config Folder. Then, you can use the tree-view to navigate to and open packages→script→lib→grammar→python.js to make your edits. It is also possible to directly edit the code under .atom/packages/script/lib/grammars/python.js

Script: Run With Profile allows you to run scripts with saved profiles. Profiles can be added in Script: Run Options dialog.

Script: Kill Process will kill the process but leaves the pane open.

Script: Close View closes the pane and kills the process.

To kill everything, click the close icon in the upper right and just go back tocoding.

Script: Copy Run Results copies everything written to the output pane to theclipboard, allowing you to paste it into the editor.

Command and shortcut reference

CommandmacOSLinux/WindowsNotes
Script: Runcmd-ishift-ctrl-bIf text is selected a 'Selection Based' is used instead of a 'File Based' run
Script: Run by Line Numbershift-cmd-jshift-ctrl-jIf text is selected the line number will be the last
Script: Run Optionsshift-cmd-ishift-ctrl-alt-oRuns the selection or whole file with the given options
Script: Run with profileshift-cmd-kshift-ctrl-alt-bRuns the selection or whole file with the specified profile
Script: Close Viewesc or ctrl-wescCloses the script view window
Script: Kill Processctrl-cctrl-qKills the current script process

Replacements

The following parameters will be replaced in any entry in args (command and program arguments). They should all be enclosed in curly brackets {}

  • {FILE_ACTIVE} - Full path to the currently active file in Atom. E.g. /home/rgbkrk/atom-script/lib/script.coffee
  • {FILE_ACTIVE_PATH} - Full path to the folder where the currently active file is. E.g. /home/rgbkrk/atom-script/lib
  • {FILE_ACTIVE_NAME} - Full name and extension of active file. E.g., script.coffee
  • {FILE_ACTIVE_NAME_BASE} - Name of active file WITHOUT extension. E.g., script
  • {PROJECT_PATH} - Full path to the root of the project. This is normally the path Atom has as root. E.g /home/rgbkrk/atom-script

Parameters are compatible with atom-build package.

Development

Online python script runner tutorial

This is an Open Open Source Project, which means:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit.

As for coding and contributing, rely on the atom contributing guidelines.They're pretty solid.

Quick and dirty setup

apm develop script

Online Python Script Runner Game

This will clone the script repository to ~/github unless you set theATOM_REPOS_HOME environment variable.

I already cloned it!

Online Python Script Runner 3

If you cloned it somewhere else, you'll want to use apm link --dev within thepackage directory, followed by apm install to get dependencies.

Workflow

After pulling upstream changes, make sure to run apm update.

To start hacking, make sure to run atom --dev from the package directory.Cut a branch while you're working then either submit a Pull Request when doneor when you want some feedback!