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

  • Thread starter Rhine720
  • Start date
In summary, you can use Python without source files by typing commands. You can also use it to create scripts and execute them.
  • #1
Rhine720
88
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?
 
Technology news on Phys.org
  • #2
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
 
  • #3
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.
 
  • #4
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.
 
  • #6
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
 
  • #7
It is from eric idle the python member
 

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

1. What is the meaning of "Confused" in Python?

The term "Confused" in Python refers to an error or exception that occurs when the code is unable to understand or execute a particular command or statement. This can happen due to incorrect syntax, missing parameters, or other issues within the code.

2. How do I fix a "Confused" error in Python?

To fix a "Confused" error in Python, you will need to carefully review your code and identify the specific line or command that is causing the error. From there, you can make any necessary corrections, such as fixing syntax errors or providing missing parameters, to resolve the error.

3. Can "Confused" errors be prevented in Python?

While some "Confused" errors may be inevitable, there are steps you can take to prevent them from occurring. This includes following best practices for writing clean and organized code, using proper syntax, and testing your code thoroughly before running it.

4. What is the difference between "Confused" and other errors in Python?

"Confused" errors are specific to Python and occur when the code is unable to understand or execute a particular command or statement. Other errors in Python, such as syntax errors or runtime errors, may have different causes and require different solutions.

5. Can I ignore "Confused" errors in Python?

It is generally not recommended to ignore "Confused" errors in Python, as they indicate that there is an issue with your code that needs to be addressed. Ignoring these errors may lead to further problems or unexpected behavior in your code.

Similar threads

  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
Replies
10
Views
936
  • Programming and Computer Science
Replies
6
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • STEM Academic Advising
Replies
3
Views
942
Replies
5
Views
890
  • General Discussion
Replies
6
Views
1K
Back
Top