Running Python in Atom.io in Windows
I already hate Python, but their "IDE" makes it worse. Fortunately, Atom.io can fix the IDE problem.
Atom.io is a Github product that whips the IDLE Python's ass. It's not actually an IDE, it's a text editor, but it's a text editor on steroids.
I stumbled upon a plugin for Atom to run various languages right in the window, including Python. The problem is that it doesn't work right out of the box in Windows. Fixing this is easy:
- Go to File - Settings (you can also press CTRL+,)
- Select Install
- In the search box, type "script" and it should come up after a few seconds
- Click install
Once it is installed (which should take less than a minute on a modern Internet connection), you will need to update the startup script to fix the path. To do that:
- Go to File - Open Your Init Script
- Add the following line
process.env.path = ["C:\Python27\ArcGIS10.2",process.env.PATH].join(";")
NOTE: I'm using the ArcGIS-bundled Python - you may need to fix that path!
Once the init script is updated, close and re-open Atom, and you should be able to select Packages - Script - Run Script (or press CTRL+SHIFT+B) to run a Python script.
I </3 Python. My expected behavior for 9/5 is 1.8. If it is to be rounded, 2. pic.twitter.com/6BUV9FBcaQ
— Andrew Rohne (@okiAndrew) June 2, 2015
I'm programming on a RPi in Python. Somehow without cussing. cc: @matungawalla
— Andrew Rohne (@okiAndrew) May 24, 2015
— Krishnan Viswanathan (@matungawalla) March 20, 2015
(my hate for Python is well-known!)