What do I do now that I've downloaded Python from Eric Idle?

  • Context: Python 
  • Thread starter Thread starter Rhine720
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 2K views
Rhine720
Messages
88
Reaction score
0
I'm using Windows Vista. Just thought I'd throw that out there.So i downloaded python 3.1. And it's like now what? After my thread about c++ i have decided to infact try out python. But i can't seem ot figure it out. Why isn't it as simple as opening up a source page? All this stuff about intepreter and what not. I'm feeling pretty stupid today so that might be it. So, I have it downloaded what now?
 
Physics news on Phys.org
When you run an interpreter like python (or other languages like Mathematica or a linux prompt, or a "DOS" prompt), you don't need source files: you just type commands and they happen immediately.


Should you want to make a source file (called a "script"), you can, with whatever editor you like, and then invoke python to run the script. I confess that I've never used python in this way in an IDE, so I'm not sure if I can help if you're specifically keeping that type of solution. My uses of python have been of the form:

Run python and execute commands directly.
In this mode, I do sometimes edit commands in a text editor, then copy/paste those commands into python. Or, I might sometimes use the import command to load and execute a "module"​

Run a python GUI, such as IDLE (it's a free download from somewhere).
I use this mode pretty much the same as the previous one. But the GUI makes it easier to deal with mistakes in typing. (e.g. so I don't have to use a text editor and use copy/paste). I have never tried to create/use scripts in this mode​

Create python scripts, and invoke them with python <script name>.
In this mode, I am typically executing python from a command line (e.g. a linux prompt, or a DOS prompt), and editing my python scripts in my favorite text editor, such as xemacs
 
I would not be surprised if there are programs that are IDE-like -- where it pops up a text editor and you edit directly, then press a button to execute the script. I just don't know of any.
 
I would not be surprised if there are programs that are IDE-like -- where it pops up a text editor and you edit directly, then press a button to execute the script. I just don't know of any.
My usual mode if I'm doing something more than a few lines long is to use a text editor to make a Python script in my Python directory. I have my pythonpath variable set up so that I can import or reload() my script in the interpreter, as I edit the file. My script tends to be a bunch of function definitions so there are no side effects to reload()ing.
 
Install idle and run in linux with python <path to idle.py>
In windows you get a bat file

Idle is a basic ide for python
 
It is from eric idle the python member