osx-mountain-lion

How to test if result of a command contains a string in fish shell?

我是研究僧i 提交于 2019-12-10 15:17:31
问题 I'm trying to write a brief function to allow me to toggle wemo lights on and off from the command line. Basically I have a command that if i type wemo status will return either Switch: Lights 1 if the lights are on or 0 if they are off. I'd like to write a fish function that essentially lets me toggle them: function lights --description 'Toggle lights' if contains (wemo status) "Lights 1" wemo switch "Lights" off else wemo switch "Lights" on end end Though this doesn't work. I'm thinking

NSUserNotificationCenter.defaultUserNotificationCenter() returns None in python

纵饮孤独 提交于 2019-12-10 15:10:44
问题 I am trying to connect to the Mountain Lion notification center via python. I've installed pyobjc and am following the instructions here and here. Also see: Working with Mountain Lion's Notification Center using PyObjC Here's my code: import Foundation, objc import AppKit import sys NSUserNotification = objc.lookUpClass('NSUserNotification') NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}): """

imagemagick identify gives “dyld: Library not loaded: /usr/local/lib/libtiff.3.dylib”

强颜欢笑 提交于 2019-12-10 12:57:12
问题 after brew install imagemagick and brew install ghostscript on osx when i run identify i get: $ identify dyld: Library not loaded: /usr/local/lib/libtiff.3.dylib Referenced from: /usr/local/bin/identify Reason: image not found Trace/BPT trap: 5 回答1: this fixes it ln -s /usr/local/Cellar/libtiff/3.9.5/lib/libtiff.3.dylib /usr/local/lib/libtiff.3.dylib thanks to rlaraujo on this link https://github.com/mxcl/homebrew/issues/12099 回答2: I ran into the same problem recently on 10.6.8. I had

German number separators using format language on OSX?

心已入冬 提交于 2019-12-10 12:34:56
问题 Update: The answers show so far that it seems to be a platform-related bug on OSX that has to do with the specific locale settings as they don't fully support grouping numbers. Update 2: I have just opened an issue on Python's bug tracker. Let's see if there is a solution to this problem. I want to format integer and float numbers according to the German numbering convention. This is possible using the format language and the presentation type n but fails on my platform. Platform: OS X 10.8.2

How can I correct my Python/pip configuration on OS X 10.8?

随声附和 提交于 2019-12-10 11:35:06
问题 I've got a MacBook Pro running OS X 10.8, Xcode 4.4 installed. I recently installed lxml, but when I went to import it I got the following: MacBook-Pro:~ jedc$ sudo pip install lxml==2.3.5 Password: Downloading/unpacking lxml==2.3.5 Downloading lxml-2.3.5.tar.gz (3.2Mb): 3.2Mb downloaded Running setup.py egg_info for package lxml Building lxml version 2.3.5. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py'

Too many pythons on my Mac OS X Mountain Lion

江枫思渺然 提交于 2019-12-10 09:45:11
问题 I updated to Mountain Lion not long ago, and having used python previously, I now have 8 (yes, 8) versions of python installed on my computer. $ ls -l /System/Library/Frameworks/Python.framework/Versions/ total 8 drwxr-xr-x 6 root wheel 204 Jun 20 16:23 2.3 drwxr-xr-x 11 root wheel 374 Aug 22 13:32 2.5 drwxr-xr-x 11 root wheel 374 Aug 22 13:32 2.6 drwxr-xr-x 11 root wheel 374 Aug 22 13:32 2.7 lrwxr-xr-x 1 root wheel 3 Jul 29 17:41 Current -> 2.7 I would love to erase all of them and clean

Only show notification if user is at computer

拟墨画扇 提交于 2019-12-09 13:32:45
问题 Whats the best way to detect if a user is currently at their computer, ie using it in some way. We have an application that should only issue notifications (banner notifications with a close button) if the user is at their computer. For example, imagine a stock trading application that alerts the user to various time sensitive information that might be relevant for only a few minutes. If the user is away from their computer, they don't want to find 20 un-actioned alerts to dismiss. 回答1:

Mountain Lion update and mercurial libraries python

ⅰ亾dé卋堺 提交于 2019-12-09 07:25:59
问题 I updated the mac to Mountain Lion (10.8) and now the project I developed with Python and Google App Engine does not work. GAE libraries are found, while standard Python libraries (are these Python libraries?) are missed (e.g. cgi , logging , json ). When I open eclipse (which has PyDeV) I receive this alert: abort: couldn't find mercurial libraries in [/Library/Python/2.7/site-packages/ /usr/local/bin /Library/Python/2.7/site-packages/pip-1.1-py2.7.egg /System/Library/Frameworks/Python

Gatekeeper signing for OSX DMGs outside of OSX/XCode/Mac App Store?

好久不见. 提交于 2019-12-09 05:09:22
问题 From looking at notes for the upcoming OSX version (the one after OSX Lion), it appears that all DMGs/installers need to be signed, even if not distributed via the Mac App store. I couldn't find a command-line tool to do this signing though, or much documentation about obtaining a signing cert without submitting to the App Store. Can someone shed light on: 1) How to obtain a certificate without distributing you app via the Mac App Store? 2) How to sign a DMG without using built-in XCode tools

Upgrading to Mountain Lion and XCode 4 broke my “make”?

僤鯓⒐⒋嵵緔 提交于 2019-12-09 05:04:19
问题 TL/DR: I upgraded stuff and now I can't run "make" - wtf? I just upgraded from Mac OS X 10.6 to 10.8 Mountain Lion, and then installed XCode 4 (formerly I had Developer/Applications/Xcode (3.something). XCode 4 installed through the App Store application to /Applications. Somewhere along the way, I can no longer run the "make" command. And I've tried looking in all the usual /bins but can't find a "make". Anyone know how to get my "make" command back? Upgrading Apple stuff always breaks