Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

SweetXOGrannie Group Title

I am working on the homework for the first week. I have a Mac with Python 2.6.6 in Terminal and IDLE available. How are we supposed to do these exercises? I have tried in IDLE and in Terminal. Nowhere does it have the option to "Run". It just runs on its own. I also have Text Wrangler installed as well as Python Launcher. I think I have too many options! Is there a link to instructions for doing these assignments on a Mac?

  • 2 years ago
  • 2 years ago

  • This Question is Open
  1. hook Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    When using the interpreter directly (i.e. IDLE), every line you enter will be ran dircetly. It’s kinda like talking directly to the computer — you say a line, he confirms he understands (or says you wrote something he can’t understand), and if it’s something that he can give an answer to, he will as soon as you press <Enter>

    • 2 years ago
  2. hook Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    dircetly = drectly (typo due to an issue with the colours in the textbox, sorry)

    • 2 years ago
  3. SweetXOGrannie Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    But what is the procedure we are supposed to use? Should we be typing the code into Terminal, IDLE, or something else like Text Wrangler? How do we get it from IDLE or Text Wrangler into Terminal? Where do we run it? I actually found difficulties in editing my code in Terminal. It wouldn't allow me to go back to the beginning to add another comment.

    • 2 years ago
  4. hook Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    While Text Wrangler is just a text editor (like e.g. Vim or Emacs) and you use it to write programs in it, store it as a file (e.g. `my_proggie.py`)and then run it with the Python interpreter by either clicking on the file or running `python my_proggie.py` in the Terminal. IDLE is an Integrated DeveLopment Environment for Python (other languages just call these IDE). Which is kinda like a bundle of tools needed to write, test and debug programs. A quick intro into using IDLE can be found on: http://www.ai.uga.edu/mc/idle/index.html That page is written with Windows in mind, but I imagine IDLE is pretty much the same for MacOS X. Disclaimer: I’m on GNU/Linux and don’t use IDLE …never needed to. I just run Python from the terminal or write programs in Vim .

    • 2 years ago
  5. hook Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    I haven’t gotten to the homework yet, but I think it’s just as fine if you stick to the tools you like and understand the most. For me this is running Python(’s interactile shell) from the terminal directly for testing ideas and writing longer things in a text editor (Vim in my case). For my brother it’s IDLE for testing and Vim for writing longer code. He doesn’t bother with the There are also other IDE that support Python as a language — KDevelop and PyDev for Eclipse come to mind. So, there is no One True Way™, try a few and see what feels good to you. In coding it’s equaly important as elsewhere that you’re comfortable with your working tools and environment ☺

    • 2 years ago
  6. estudier Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    When you are "developing" you want to be able to quickly switch back and forth between an editor (from which u can save your current state) and execution.

    • 2 years ago
  7. exchaoordo Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Try this video: http://www.youtube.com/watch?v=lBkcDFRA958

    • 2 years ago
  8. MOOC-E Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    @SweetXOGrannie go back to http://mechanicalmooc.wordpress.com/2012/10/08/a-week-to-go-mmooc/ and look at the Berkeley document near the bottom. Should help.

    • 2 years ago
  9. rsmith6559 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    If you're just starting out, I wouldn't recommend any of the editors that run in Terminal. TextWrangler would probably be the easiest for you to work with. I'm not a fan of IDLE. After you write/edit what you want in TW, save it to say, your Desktop. Then when you launch Terminal, immediately do: cd Desktop and press enter. Now Terminal is in the same directory as your file. You can then execute your file with: python ./yourFile.py You can also open many Terminal windows. I frequently use 6 windows while I'm writing stuff. One of my windows will be the Python interpreter. Just type: python and hit enter. You can use this to test a couple/few lines of your program to make sure that they do what you want/expect them to do. The interpreter won't save any of this, but if it works, you can highlight it and copy it and then paste it into your editor window.

    • 2 years ago
  10. ahzthecat Group Title
    Best Response
    You've already chosen the best response.
    Medals 3

    From IDLE (the window named Python Shell) click file and then 'open new window'. That opens a window you can write your code in. When you want to run that code, first save your work as <whatever filename you like>.py then click the "run" menu and select Python shell. Your code will then be executed by IDLE.

    • 2 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.