Vegetarian Pastitsio

Vegetarian Pastitsio

PyCharm + Django runserver “Inappropriate ioctl for device” error

While I am by no means opposed to coding in a text editor such as TextMate, the convenience of an IDE with code-completion & integrated debugging is always a preferred option when available. I’ve been doing all my Django development in TextMate and a command prompt and it’s by no means painful, but there are some repetitive actions that could be simplified, and code-completion would make things so much faster. I’m vehemently opposed to Eclipse even though a myriad of developers out there swear by it, but I came across PyCharm from JetBrains over the weekend and it’s actually pretty damn nice… BUT using the integrated command for runserver was failing with:

termios.error: (25, 'Inappropriate ioctl for device')

I saw this referenced in a few posts around the web but none of them put together a single defined solution to the problem, so here’s what I ended up having to do. Supposedly JetBrains even made a workaround in a PyCharm release several releases ago, but it still wasn’t working for me using Django 1.3 and PyCharm 1.5.  You have to modify one of the files in your django install, which for me was in my system python site-packages directory. Here’s the specific patch you have to apply.

Rails is busy optimizing for the anal superior coder who wants to learn things for the sake of learning things, which is neat and cool but not worth it if you just want to make a website.



Macchiato doppio (Taken with Instagram at La Prima Espresso Company)

Macchiato doppio (Taken with Instagram at La Prima Espresso Company)

Converting Django Models to UML

Incredibly useful time saver here. In case anyone runs into problems using it, I first had to install graphviz using macports, then used pip to install pygraphviz, then was able to use it successfully.

Windows 8 - 10 years behind Apple.. or not?

Microsoft appears to finally be taking a step in the right direction with what they’ve shown us thus far with Windows 8. As with Windows Phone 7, they are actually innovating instead of merely copying the competition, their typical strategy in the past when they had the comfortable lead to do so. There’s already been much heated discussion regarding the subject, ranging from the opinion that Windows 8 is fundamentally flawed to touting that it’s the biggest change since Windows was invented. Everyone is busy comparing it to iOS, but I’d like to point out another similarity - OS X. 

Once upon a time Mac OS was… well… garbage, in my opinion. I’m talking about the days of OS 8 and 9, etc. Many of you will remember those days - where Apple zealots were few and far between, it was just “for designers” we all used to say. I was busy over-clocking my homemade PC and using NeXT machines (little did I know how valuable that experience was) in the labs in college. I had already abandoned Windows as my primary OS, and thought I was just so cool being one of those nerdy Linux guys which was a rarity back then. 

Steve came back to Apple and well, things started to change. The sexy hardware caught our eyes first, then as I worked with OpenStep and saw it evolve into Rhapsody I still didn’t really envision what the future held. A little later early betas of Mac OS X Desktop were shown to me and I’ll admit I was more impressed by the eye candy than the underpinnings back in those days. The combination of that well designed hardware and a great-looking functional OS sucked me into purchasing a used G4 PowerMac. OS X 10.0 was utter crap, beleaguered with countless bugs and it was just dog slow. It took them a few years IMHO to get it right, but boy did they get it right, and I left Linux behind as a desktop OS. Meanwhile, Microsoft’s products just degraded and degraded.

Sorry for the back story, but I tell it because I believe Microsoft is doing what Apple did 10 years ago with thier OS right now. It’s reboot time. People are complaining that Windows 8 will have to support legacy apps and it will ruin the experience, but we had to do the same thing with Classic Mode back in OS X 10.0. It’s such a completely different UI than their standard OS, so users might get confused - just like they did with OS X. I remember people not wanting to switch to OS X. It’s a basic fact that Microsoft can’t redo everything at once. There has to be a transition, so chastising them for mixing the UI’s at this point is a little premature. They have to start somewhere.

This could lead us all to believe that Microsoft is 10 years behind Apple in terms of the OS if they are just now “rebooting” their UI and underpinnings, but the fact is Microsoft needs to start over and stop playing catch-up to Apple. We’ve all been waiting for OS X and iOS to merge, but guess what? Microsoft is doing that right now. I’m no Microsoft fanboy by any means, so there’s a big chance they’ll screw this up, but we’ll just have to wait and see. Apple took a gigantic endgame risk going away from their core OS to NeXT based OS of the future a little of 10 years ago, and here’s to hoping Microsoft can do the same. They may finally give Apple a run for the money this decade.

Finally pulled the trigger on an Eames aluminum group management chair

Finally pulled the trigger on an Eames aluminum group management chair

Beerby released for iPhone

I’m proud to say that Beerby 1.0 has been accepted into the Appstore by Apple on its first submission. Beerby is an application for users to track, share, and find beer while competing with their friends along the way. It’s the first application released that is powered by the Levlr Game Mechanics platform we’ve been working on for a few months now.

The basic feel of Beerby is a structured tracking application for the beer drinking adventures of you and your friends. You can track what you drink and where you drink it, thus enabling the Beerby community to find the beers they are looking for in your geographical area. We integrate with Foursquare so that Beerby can check you in while you tracking your favorite beverage. Our achievement engine lets you earn badgers (not badges, we already have enough of those) for your valiant efforts in beer consumption. 

We’re already submitting an update to Beerby this week that will allow users to compete more directly with both their friends and the general public on who just is the king of Coors Light, or… perhaps something a bit more tasty like the upcoming Southern Tier Imperial Pumking of which I plan to be a major contender. There’s also a ton of other fixes and enhancements that are expected for a 1.0 release :)

This is our first example of the type of application that can be built using the toolkit that we’ve created. We plan to offer the API and Platform to users and businesses to create exciting applications to motivate their customers and end users, and also offer Levlr as an integration point so that existing applications can add game mechanics to their offerings.

If you are a bar or restaurant and want to promote your beer selection through Beerby, please contact us at Levlr. If you’ve got an iPhone, please download Beerby now and get all your friends on board! 

getting django to work with pydev on os x

I figure I may as well make public mention of this since it gave me some trouble while trying to get django and pydev/eclipse to play together nicely this evening. By default if you went through the standard route of installing django the framework will reside in:


Pydev did not find this directory in the auto config for the PYTHONPATH, so when you create your first django project in Eclipse you will get errors such as:

unresolved import in the line: from import execute_manager

To solve this I tried adding several directories to the PYTHONPATH in Eclipse, but in the end the one you need to add is:


This will get django, mysqldb, and whatever else you have in there. Obviously as time goes on that path to version 2.6 will change.

i hugged a kangaroo today