7 ms·
Quick Python/Developer tips for OSX Lion
- jnoller 15y agoI'll add more as they come up or people share them. I'm pretty happy with the upgrade, and nothing broke for me, really. My VMWare Fusion system kept chugging along, etc. Also, full disk encryption is amazing
- waterside81 15y agoHey Jesse, thanks for this post. Your notes on Python / OSX development have helped me out several times over the past year or so.
- vonSeckendorff 15y agoI've always been doubtful of OSX's crypto. At least with the past versions I was always worrying about side channel attacks. Merely using encryption on your home folder is obviously going to leak information to unencrypted portions of the disk (not to mention spotlight indexing); but more insidious is default safe sleep (which will write out your encryption key to disk) and DMA enabled ports.
- jnoller 15y agoI've never used apple encryption on a disk until Lion - the few times I've tried to use filevault, it has ended in tears, pain and frustration (have you ever run VMware images on filevault? Yeah.) The implementation in Lion is amazingly good; I do hope they close the DMA port issue though.
- ConstantineXVI 15y agoJust discovered this The Hard Way, but if you run Boot Camp; make sure you get the Boot Camp 4.0 update on the Windows side before you turn on FileVault. If not; Windows will try to mount your Mac volume (which is now encrypted gibberish), fail miserably, and BSoD every time within 30s of logging in. If it's too late, booting into safe mode and renaming the HFS drivers (AppleMount.sys and AppleHFS.sys IIRC) in C:\Windows\System32\drivers will get your system out of limbo.
- jnoller 15y agoAdded a note to the OP; thanks.
- Groxx 15y agoSince you seem to have hatred for the animation (doesn't bother me, personally. Probably there to draw your eye to the new window more strongly), have you tried "Secrets" before? http://secrets.blacktree.com/ http://secrets.blacktree.com/ they've got the animation switch in there already. Easier on/off than mucking around in the CLI ("NSAutomaticWindowAnimationsEnabled" isn't exactly memorable or fast to type), and you can see the current state of nearly everything in their list.
- jnoller 15y agoAdded to the op - I knew about secrets, but had long ago forgotten about it.
- Groxx 15y agoSince I have your attention temporarily, I figure you should also know about this: https://github.com/mxcl/homebrew/issues/6732 https://github.com/mxcl/homebrew/issues/6732 I had errors when I ran `brew update`. Looks like it might hit most people who have installed it recently, so possibly all new clean-install Lion users (I haven't checked the commit history to see when it might have started, and it could be related to a version of Git anyway). edit: and thanks for the write-up! I found a few things I didn't know about :)
- hello_moto 15y agoHaven't upgraded to OSX Lion and probably won't purchase MacBook anymore in the future (I currently own a 13" MBP). Setting up development environment in Linux seems more sane not just for Python but for almost everything else (Java, Ruby, typical LAMP stack) except if you're doing iOS development.
- jnoller 15y agoI only do Linux/web development; and it never really bothered me. Of course, I'm doing Python development, which means I rarely run into issues (and if I do, homebrew fixes them easily). I also run VMware fusion with Ubuntu/Fedora VMs for deployment testing. And throw in about 4 windows VMs for IE/compat testing to boot. So, I disagree that it's "more sane" - I spend plenty of time chasing down crazy outdated versions of Python libraries the apt/yum repos contain, etc, and well, I don't like spending my time in linux window managers (I dislike the UI) so it's a wash, and getting a linux dev environment setup on my mac is as simple as booting a VM and swapping it into fullscreen. But to each their own. If I wasn't running OSX, I'd be running Linux. I just prefer one OS' aesthetics over another. See also Vagrant (http://vagrantup.com/ http://vagrantup.com/) - runs off of virtualbox if VMWare isn't your thing.
- hello_moto 15y agoAt some point in time in my life (I don't know when), I started to ignore the UI of various OSes. Most of my time I spent in an IDE, browsers, and occasionally a communication software (Outlook, LotusNotes, e-mail client, whichever floats). On the other hand, I thought people install Python libraries either directly downloading the distributions or via easy_install? I never install modules from apt/yum.
- jnoller 15y agoshrug - Like I said, it's a matter of aesthetics and usability for me. I've never met a Linux UI I liked (except for XFCE a long time ago), and I go out of my way not to use non-native apps on OSX. It's all about personal preference. I also dabble in design and UI/UX, and have for some time, maybe that's why. ps. easy_install is bad for you, use pip! http://www.pip-installer.org/en/latest/index.html http://www.pip-installer.org/en/latest/index.html
- angrycoder 15y ago1) Install iTerm 2, a better terminal 2) Install Alfred, disable the spotlight hotkey and assign Alfred to Command+Space 3) Install Witch, a better command tab switcher that handles minimized windows.
- jnoller 15y agoiTerm2 -> Dislike, it doesn't offer me any benefits to my current workflow. Alfred -> If you don't have this installed before upgrading to Lion, which the article is about, then I think you might have something wrong with you :) Witch -> Never used it.
- makecheck 15y agoI wrote an alternative, MacTerm (http://macterm.net http://macterm.net). I think it has some advantages over the iTerms or Apple's Terminal.
- riobard 15y agoI'm wondering what's your screen resolution? I'm using it on 1920x1080 + 1600x1440 dual screen. To me, the ability of iTerm2 to vertically and horizontally split multiple terminals fullscreen on a big monitor is a huge plus. And for a lone time, Terminal.app before Lion only supports 16 colors, which is a big reason for me to switch to someone better. iTerm2 fits the bill.
- jnoller 15y agoI don't like splitting terminal windows - I use the tabs built into terminal.app and sizeup (http://irradiatedsoftware.com/sizeup/ http://irradiatedsoftware.com/sizeup/) to split/stack essentially "tab groups". I normally have multiple spaces, each with 50% of the horizontal screen dedicated to vim, and the other 50% to two groups of terminals (each one taking 50% of the vertical). I'm not running dual screen - just 1900x1200 and 1440x900 depending on where I am. Like I said, it's a workflow thing. I didn't even notice the increase in terminal colors - all my good coloring is in mac vim, not in the terminal.
- neutronicus 15y agoHuh. He said "need done" instead of "need to be done". I wonder if he's originally from Pittsburgh?
- jnoller 15y agoAlaska, actually. Where did I say that in the article?
- neutronicus 15y agoOh, this is embarassing - I thought I was commenting on the Android/iOS article.
- vonSeckendorff 15y agoThe author states Lion’s default Python install is a healthy Python 2.7.1. I have personally had an unreasonable amount of trouble installing and using Python libraries and environments on Snow Leopard. I think right now I have at least 3 different versions of Python installed, each with various and disparate libraries. Has this been addressed in Lion? Getting Numpy, Scipy, etc to work is a chore; especially when comparing it to the Linux experience.
- waterside81 15y agoI used to have trouble getting numpy and scipy installed - until I started using homebrew. It blows MacPorts out of the water. Just make sure your architecture is set correctly as Jesse outlines in this blog post, otherwise you'll run into problems building the various C components with gcc.
- jnoller 15y agoWhat he said; use homebrew - judicious use of homebrew and virtualenv will save you lots of pain. I never install framework builds from python.org - I don't like installing things into /Library or ~/Library
- pama 15y agoFor emacs: change the system-wide keyboard shortcuts for mission control (Ctrl-up and Ctrl-down have better uses).
- null_para 15y agoBy the way, does anyone know how painful is it to get Mysql working for Python apps. Installing MysqlDB on Python was painfully excruciating process on Snow Leopard.
- orangecat 15y agoI've had good results with the pure Python "MySQL Connector": https://launchpad.net/myconnpy https://launchpad.net/myconnpy
- oasisbob 15y agoHas anyone had any success using the osx-gcc-installer he mentions? I'm really curious how well it works in comparison to Xcode. https://github.com/kennethreitz/osx-gcc-installer https://github.com/kennethreitz/osx-gcc-installer