With my fresh install of Python 3.6 and upgrade of editor/IDE to LiClipse with PyDev, I’m feeling like a whole new me! 🙂 I’m ready now to upgrade the script I’ve been working on to be compatible with the latest version of Python.
Running a Script
Here’s a quick how-to, if you’re just getting started with Python on Windows to follow along running a/this Python script…
- install the latest 3.x version of Python (and be sure to choose your correct architecture for your OS)
- when installing, I recommend adding Python to your PATH
- install LiClipse and open it
- set your working directory appropriately
- easiest to make this the “base folder” where you want your script and related files to be
- go to File –> New –> PyDev project
- pick a name that will be the folder for your project
- you’ll always need to be connected to a project for it to find all of your settings
- on the first run, you’ll have to configure an interpreter
- make sure your script and associated files are in the folder you just made
- click the script in the project tab file tree
- click the green arrow “Run” button drop down menu –> Run as –> “Python Run”
That’s a “quick start” guide to how you run your script!
When you want to debug, take similar steps but this time, using the little bug icon. You’ll want to get into “Debug Perspective” for this.
Window –> Perspective –> Open Perspective –> Other… –> Debug
To get variables to show up, you need to add a break point.