Python is a programming language that is included in the standard OSX installation.

learn more… | top users | synonyms

14
votes
4answers
17k views

How to get the fully resolved path of a symbolic link in Terminal?

I have a tangled mess of python installations on my laptop. I was looking at the executables in /usr/local/bin and they are all symbolic links to ../../../Library...... There's some weird behavior ...
11
votes
4answers
14k views

What's wrong with my launchctl config?

I'm trying to auto-run SickBeard on login python /Applications/Sick-Beard/Sickbeard.py <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN ...
7
votes
2answers
5k views

How can I bring a window to frontmost without focusing it using Applescript in OS X 10.8

I want to bring a window (QuickTime for example) to frontmost, without focusing it. I can do it in OS X 10.7 using the following code in Applescript. tell application "System Events" set visible ...
7
votes
0answers
20k views

How to install command line developer tools in Yosemite? [closed]

I am trying to install xcode developer tools via this command: xcode-select --install and I have this error: "Can't install this software because it is not currently available from the Software ...
6
votes
4answers
8k views

Python Virtualenv is broken since upgrading to OS X Mountain Lion

Since upgrading to Mountain Lion, when running the command "virtualenv env", I get: New python executable in env/bin/python Installing setuptools......... Complete output from command ...
5
votes
1answer
3k views

iTerm2 doesn't read com.googlecode.iterm2.plist

I am iTerm2 (1.0.0) user. I know how to create profiles, by using iTerm settings or modifying com.googlecode.iterm2.plist file. For convenience, I will use .plist to indicate ...
5
votes
1answer
5k views

How do I change back from MacPorts Python to system default version?

I used MacPorts to install a newer version of Python on my system (10.5.8 PPC), and then used the MacPorts select command to change the default invoked version of Python to the MP version. Now I want ...
5
votes
1answer
873 views

Installing Python 3.0 on my Mac

I'm using built-in Python 2.6.1, however, I need to run Python 3.0 from time to time. Is it OK to install Python 3.0 on my Mac? Is there anything that I need to be cautious? How about the ...
5
votes
1answer
405 views

How to add a Python application to OS X right-click menu?

I have made a Python-based application that plays a slideshow. I want to add shortcut on the right-click menu of a folder and play the slideshow. How can I achieve this?
4
votes
2answers
103 views

What are the most convenient keyboard/keyboard layout for programming?

I do a bit of Objective-C, Matlab and Python, and start to get tired of the keyboard I use (AZERTY). It is far from being optimal as one need to press ALT+SHIFT+( to get [ for example. I think of ...
4
votes
2answers
667 views

How to make an executable .py available everywhere on OS X?

I have this directory /foo/bar/. Inside, I have a python file named myfile.py. I made it executable by adding (at the top): #!/usr/bin/env python Then, I made it executable by issuing chmod +x ...
4
votes
3answers
2k views

Installing Python on Mac 10.5.8 64-bit

I'm working on getting Python installed on my Mac 10.5.8 and I have been having a heck of a lot of trouble. The standard downloads at Python.org do not show a compatible version. They have 10.3 - ...
3
votes
3answers
11k views

What version(s) of Python are pre-installed on OSX 10.9 Mavericks?

Now it can be asked... What python versions come pre-installed, Is python 3.x on there? Edit: From the comments: "Does it also still have 2.6? The reason I ask is, with 2.6, I can build an app ...
3
votes
3answers
531 views

where are python packages installed on Lion?

I'm pretty sure before Lion, I was using /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages Although this might have been from a manual install of 2.7 on 10.6 OS ...
3
votes
2answers
702 views

Prevent “<application> quit unexpectedly” message on sigquit

I kill Python processes with SIGQUIT by pressing Ctrl\ sometimes (usually my own that are misbehaving). Can I prevent the "Python quit unexpectedly" message? I know I can just hit escape, so it's not ...
3
votes
1answer
2k views

How can I tell Firewall to allow incoming connections for Python running a specific script? (In this case: SickBeard)

I'm running SickBeard on my Lion installation, but I can't figure out how which Python version or script I should add to the Firewall rules allow connections from outside. In Console I get this ...
3
votes
2answers
371 views

How to run a cron job each time the previous execution has finished?

I would like to run a Python script each time it finishes and I think I can do this with cron but I am not sure how to do it. The idea is each time the Python scripts ends, it will have to run again ...
3
votes
4answers
8k views

How do I setup Python3.3 and Sublime Text 2 correctly on OS X 10.8.2?

I am trying to setup Sublime Text 2 so that the build command correctly runs Python3 / Python3.3 scripts. I have installed Python 3.3 via the installer obtained from python.org and installed Sublime ...
3
votes
1answer
1k views

Error installing lxml on Mac Snow Leopard

I am getting what seems to be a common error when trying to install lxml on MacOS 10.6: Building lxml version 2.3. Building without Cython. Using build configuration of libxslt 1.1.24 ...
3
votes
1answer
607 views

How do I know which Python install is being used?

If I type the command which python, then I get: Oliviers-iMac:~$ which -a python /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/bin/python If I then type python --version, ...
3
votes
2answers
132 views

Offline (Python) documentation? (for ActivePython Mac or similar)

I'm a long-time user of ActivePython, and also own a couple of Komodo licenses. I've recently moved to the Mac, and one thing that I'm missing a lot is the "offline" documentation (i.e., in Windows ...
3
votes
1answer
3k views

How to update Python on a Mac with Unix commands

After giving up on doing a disk partition and getting Linux, I decided to try and install Python 3.3.2 on a 32 bit Intel Core 2 Duo iMac with OS X 10.6.8 Snow Leopard. I did pretty much everything the ...
3
votes
3answers
307 views

Problems integrating Python 3.1 on 10.6.5

I am beginning to learn Python, and want to "upgrade" my Python installation os OS X 10.6.5. I know it's a bad idea to directly upgrade the Python install, so I have installed Python 3.1 separately ...
3
votes
1answer
38 views

Install and import site-packages for Python 2 and 3 on Mac

I installed brew and then brew install python brew install python3 Install flask with pip pip install flask Try python -c 'import flask' But I got exception ImportError: No module named ...
3
votes
0answers
134 views

Disabling the dialogs shown when opening an application for the first time on OSX

I am making an app on osx 10.9 using python 2.7. But when it is launched first time, warning comes. You are opening the application MYAPP for the first time. Are you sure you want to open this ...
2
votes
6answers
155 views

What python editors have syntax coloring and don't need much training to learn?

I have a friend who is trying to learn Python on Mac OS X. She does not have prior experience with programming. I am looking for an editor that is: Free and easy to get started with Support at least ...
2
votes
1answer
1k views

Snow Leopard: Current: python 2.6 - Desired: python 2.7

Is it possible to upgrade the native python version (2.6 on my Snow Leopard) to a more recent one? Or do I have to just install python 2.7 besides the current one?
2
votes
2answers
402 views

Run through terminal PYTHON

Is there a way on a mac to make it so when you click on a python script it runs python filename.py through terminal?
2
votes
1answer
658 views

Python editor for ipad with mercurial support?

Is there a text editor for ipad which supports python and mercurial? It would be even better if there were a solution that also allows one to run and develop with django. Any suggestions?
2
votes
4answers
339 views

iPhoto and Python 2.6

I eradicated python 2.6 from my MacBook pro. Of course I did this before realizing iPhoto was dependent on it. How do I point iPhoto to my newly installed version of Python? This is the relevant ...
2
votes
1answer
288 views

Why is 'xattr' not working?

When I attempt to execute xattr in Terminal, I get Traceback (most recent call last): File "/usr/bin/xattr-2.7", line 33, in <module> import xattr ImportError: No module named xattr ...
2
votes
1answer
1k views

Using Mac OS X 10.9 lsof launches 5 to 10 processes at a time on its own taking all cpu

I am running a MacBook Air 13 (Latest) with 8GB / 512 Flash / Core Intel i7. Lately shortly after bootup I hear the fans winding at top speed. I checked the top processes and see several instances ...
2
votes
1answer
2k views

ipython/python broken after upgrading to OS X Mavericks

After upgrading to OS X Mavericks, it seems Python broke. I get the following when I try to run ipython: ~ $ ipython Traceback (most recent call last): File ...
2
votes
2answers
40 views

Make a python program an application

I would like to make a Python program executable, like in Windows, when you use a program like cx_Freeze to make Python programs become .exe. I would like to do the same for Mac, I would like to make ...
2
votes
2answers
248 views

iTerm2, unicode and sympy

In my both Mac (OS X Mavericks) and Ubuntu machine, I have installed sympy that is a python library for symbolic mathematics. Part of sympy is the pretty print functionality that uses unicode ...
2
votes
1answer
2k views

How to create a VPN connection via terminal?

I have a macbook pro with mavericks running. I am looking for a way to connect to a VPN network in terminal. The reason why I want to do this is that I want to write a small program in Python which ...
2
votes
1answer
917 views

Deploying a python application in OS X Server 2.0.23 (aka Mountain Lion Server)

OS X Server 2.0.23 (aka Mountain Lion Server) already has python 2.7.3 and wsgi installed. What is the procedure to install a python web application on that server to run under its own domain? Assume ...
2
votes
1answer
35 views

Can my web app use a UNIX socket on OS X Server?

I'd rather have my Mavericks web app use a UNIX domain socket instead of a TCP port to effect a reverse proxy. I've tried using variants of the Apache syntax for UDS in the proxies section of the web ...
2
votes
1answer
513 views

Preview Not Opening File - Permissions Issue (via Python)

I have a Mac VM running Mavericks (10.9.3), and for various reasons I am trying to write a script in Python to automatically transfer a PDF file to the VM and open it in Preview. For anyone who ...
2
votes
0answers
515 views

How can I install a working bluetooth library for Python?

I need to access Bluetooth from Python. I have tried installing lightblue via easy_install. It installs properly, but when I try to import it it fails. User@Mac:codes$ python Python 2.7.5 (default, ...
2
votes
0answers
449 views

brew doctor warning about Python config scripts

Can someone please explain what I should do about the following warning from Homebrew: Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look ...
2
votes
1answer
317 views

Upgrade to Mavericks wipes out Python site-packages directory?

As the subject suggests, I recently upgraded to OSX Mavericks, and... $ ls /Library/Python/*/site-packages/ /Library/Python/2.3/site-packages/: Extras.pth README /Library/Python/2.5/site-packages/: ...
2
votes
1answer
188 views

Mac Port install arguments

I need to install ROOT on my mac. Since I prefer Python for Scientific Computing I though that it would install PyROOT by default. That didn't happen. After I looked on PyROOT site i found that ...
2
votes
1answer
386 views

SCTP kernel extension for Mavericks?

I am about to do some development with SCTP using Python[1]. But this requires some kind of 3rd party kernel extensions to Mac OS X. The only link I can find about the kernel extension is completely ...
2
votes
1answer
260 views

Python Weirdness on Terminal Open

When I open Terminal I see the following: Last login: Wed Feb 8 18:30:05 on ttys029 Traceback (most recent call last): File ...
2
votes
1answer
758 views

Scapy on Mavericks via Homebrew “AttributeError: 'module' object has no attribute 'intf'”

I tried to install Scapy on OS X via Homebrew which seemed to work fine. After installation there were some Python modules missing which I installed via Homebrew. Now when I start Scapy I get the ...
1
vote
2answers
6k views

Python Imaging Library (PIL) Decoder jpeg not available — how to fix?

I've got error which is generated by PIL when I trying to process jpg-images: Python Imaging Library (PIL) Decoder jpeg not available. How to fix this problem?
1
vote
2answers
543 views

How to install framework (from pkg file) in a non-standard location?

In brief, my question is this: How can I install a framework from a *.pkg file somewhere other than under /Library/Frameworks (or /System/Library/Frameworks)? Background I want to install a ...
1
vote
1answer
1k views

“Cannot execute binary file” with alias of binary

I have installed both python3.3 and python2.6. I have set python3.3 to default by creating an alias named "python" in usr/bin and another one for python2.6 named "python2.6". Now if I type in the ...
1
vote
3answers
1k views

Retina display compatible Python IDLE?

On my Retina MacBook Pro, the Python IDLE development environment has blurry, non-retina text. Is there a way I can make the text retina? IDLE: