![]() ![]() In this article I'll introduce you to three IDEs and code editors that can make your Python journey smoother.īut before I begin I want to clarify the fact that this is not an exhaustive list. While this can be great, choosing the best one becomes a bit tricky. The problem with popular languages like Python is that every IDE or code editor under the sun seems to have good support for the language. A good integrated development environment (IDE) or Code Editor can really boost your productivity. You have now written and run a Python script.Much of your experience as a developer will depend on what program you've chosen to write your code in. Then click Run -> Run Module to run the script: If you're feeling ambitious, try creating a Python script by clicking File -> New Window, which will open a text editor window, and enter the following line:Ĭlick File -> Save and enter hw.py for the filename. This is where we'll pick up the workshop. You should now have an IDLE session open that looks something like this: Launching IDLE from the WORKSHOP directory will be the same as for the Mac case above (just use your favorite terminal instead of Terminal.app). apt-get install idle (Ubuntu/Debian/etc.), yum install python26-tools (RHEL/CentOS/etc.), USE=tk emerge -avn python (Gentoo), etc., or install new version of Python from source (which will include IDLE). Python is installed by default, but sometimes IDLE is not.Įither install IDLE using your distro's package manager, e.g. These instructions are for an older version. Note: Please ask a TA for help in updating to the most recent python version Where WORKSHOP is replaced by the directory you chose to use for the workshop. Open up Terminal.app from the Applications menu, and type: We're going to want to launch IDLE from within the WORKSHOP directory. If you don't know the system architecture, try running uname -a in Terminal.app. Look for the Mac download, choose the one appropriate for your OS X version. Python and IDLE are both installed by default on recent Macs, but they are older versions.įollow these instructions for a Mac binary install, or install from source, using the instructions further down the page. You should now be able to double-click idle.bat to open IDLE. Make sure you select "All Files" for "Save as type:". ![]() Save the file into your WORKSHOP directory. Let's create a Windows script, idle.bat that does that: This is easiest if we start IDLE from the WORKSHOP folder itself. However they're going to need to know about the files we create during the workshop. IDLE (Python GUI) and Python (command line) should now by in your program menu, under Python 3.4, and Python will be associated with. Make sure to select it and change the option to "Entire feature will be installed on local hard drive." Note that IDLE will be installed too, by default. "Add python.exe to Path" that is unselected. Run the installer and click through the prompts.ĭefault options are fine, except when you get to the "Customize Python 3.4.3" window. 64-bit: Python 3.4.3 Windows X86-64 Installer.Unless your computer is very old, your best bet is downloading the 64-bit version. Look for the Windows downloads, choose the one appropriate for your architecture (32-bit or 64-bit). Python and IDLE are not installed by default. We will be using version 3.4.3 of Python in this class. This folder you created is referred to generically as WORKSHOP below. For Mac users, create this folder at ~/workshop (Mac/Linux). If using Windows, create a folder at C:\Documents and Settings\MY_USERNAME\My Documents\workshop (Windows). ![]() The workshop does not rely on any of IDLE's specific features, but it makes setting up Python much easier and provides a multi-platform basis for examples.Ĭreate a folder for all your python code and other files. We'll be using Python frequently in class, and it'll save lots of time if everyone has this installed and is familiar how to open, edit, and run a script (which is just a text file) using Python.įurthermore, we'll be using IDLE, Python's own IDE (Integrated Development Environment). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |