Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

doctorabyss

macrumors newbie
Original poster
Nov 24, 2010
4
0
I cannot figure out how to write a script in the terminal, specifically, python.
Any help would be appreciated, thanks
 
eee, that's a tad too complex for me atm, but thank you.
There are no simpler ways?

Oh, I just noticed hayduke's reply.
I'll try that. thanks!
 
Dashcode

Why not use an editor such as Dashcode. That's what I use for editing PY files. Dashcode is part of the XCode developer tools package located on your OS Install Disk.

Once installed go to /Developer/Applications folder, open Dashcode.

This is all you need to do some pretty cool stuff with Python on the mac.

Mel
 
bah, this is my boyfriends computer, my mbp needs to have a new screen installed, and he tossed out his install disk, so I can't DL dashcode without paying 99 bucks :/
 
You could also just use TextEdit and save the files as .py...

Or you could run python in interactive mode - go into Terminal and type 'python'.


On a side note, I thought you only had to pay $99 if you wanted fancy stuff...I thought you could sign up and download XCode for free. I could be mistaken though.




Molecule :apple:
 
Yeah, it's a free download but it's a hefty download at that. See XCode.

Good point, textedit would be the next best thing but terminal is kinda clunky to use, I didn't like it. Dashcode is my preferred editor, its free. :)
 
I have no discs, at all...
Yeah, I guess I'll just be using text editor for the meantime...
I do run python with the terminal currently, but I am only aware of how to do statements, not full scripts...
also, I don't believe you can save anything in terminal as a script.

To download it from the internet, you need to register as an Apple Developer, which requires a $99 fee.

Nevermind- it looks like through the link you provided, it is free.
Thanks!
I'll see if my boyfriend minds the DL
 
I have no discs, at all...
Yeah, I guess I'll just be using text editor for the meantime...
I do run python with the terminal currently, but I am only aware of how to do statements, not full scripts...
also, I don't believe you can save anything in terminal as a script.

To download it from the internet, you need to register as an Apple Developer, which requires a $99 fee.

Nevermind- it looks like through the link you provided, it is free.
Thanks!
I'll see if my boyfriend minds the DL

I think the $99 fee is only when you are going to distribute applications. Xcode itself is free.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.