Skip to main content
Question

Using Python?

  • December 3, 2012
  • 2 replies
  • 12 views

Forum|alt.badge.img+8

Who out there is scripting in Python for their Macs? What do you use it for that's better than using Bash for? Anyone move over to Python from Perl?

Just curious...

2 replies

Forum|alt.badge.img+10
  • New Contributor
  • December 3, 2012
Who out there is scripting in Python for their Macs?

Me!

What do you use it for that's better than using Bash for?

Anything slightly complex; anything dealing with arrays or structured data like plists or dictionaries; anything that needs to use Cocoa methods or Foundation or CoreFoundation methods.

Anyone move over to Python from Perl?

Yes, as well.


Forum|alt.badge.img+3
  • New Contributor
  • December 4, 2012

I second Greg here. I use Python for almost anything more complex than a simple if/then script. I use it for regular maintenance tasks, system configuration, and also have written a handful of extension attributes in it.