Last night we ran into a slight problem. We are running Python 2.5 on our Macbook’s, but our server is running a very stable 2.4. No problem right? Well kind of.
The first problem we encountered is related to PEP 308. Someone who had written a RSS parsing plugin for Django, failed to mention that it minimally needed Python 2.5 to run correctly. But this is one of the greatest advantages of open source. I rolled up my sleeves and removed what the PEP calls conditional expressions. I’ve always referred to these as the Ternary operator [or operation]. Continue reading
What worked for me; short and simple:
1) Install iPython
- sudo easy_install ipython
2) Download the file/egg for Mac OSX readline, and place in path, then edit easy_install.pth
- Download: http://ipython.scipy.org/dist/readline-2.5.1-py2.5-macosx-10.5-i386.egg
- cp ~/Downloads/readline-2.5.1-py2.5-macosx-10.5-i386.egg .
- sudo vim easy-install.pth
- While editing the file add: ./readline-2.5.1-py2.5-macosx-10.5-i386.egg
3) Run iPython and test.
I initially used this guide, but made some changes:
1) Downloaded Django-1.0.tar.gz from here.
2) Created and extracted the contents of the tar.gz:
tar xzf ~/Downloads/Django-1.0.tar.gz
3) Make the following soft-links:
ln -s ~/sandbox/Django-1.0/django django
sudo ln -s ~/sandbox/Django-1.0/django/bin/django-admin.py django-admin.py
I thought I’d share some of my initial experiences with the Apple iPhone Development Program. A lot of people are complaining about the Fucking NDA. I don’t know if even my feedback is subject to breaking the agreement I accepted with Apple.
Initially, I heard it cost $99 to register and become a iPhone developer. This is not the entire truth. Upon jumping on my new MacBook, I downloaded and installed XCode with the iPhone SDK. This is completely free to do and requires nothing for you to spend. You have access to the documentation, code samples, etc.
So here is where I thought perhaps the $99 was only when I was ready to distribute an application?!? Wrong again. Once I had began downloading code samples, and writing some of my own. I found the virtual iPhone to be a great tool, but not so great when you want to play with the accelerometer. I had considered shaking my MacBook! Apple typically does think of everything. 🙂 Continue reading
I decided to grab lunch and read more of what I could find on Google App Engine (GAE). Found a few interesting sites.
Steve talks about how GAE fills a much different need in the cloud computing arena than Amazon has done with its own S3 and EC2. Google doesn’t charge you for the server you rent (i.e. like EC2), but rather they charge you with how much you actually use.
Next up is Shannon, who explains how .NET can leverage GAE through abstraction via a webservice call.
Last up, is a solution I found very interesting. Andreas explains how GAE can be used as a Content Delivery Network (CDN). I won’t bother going into details of what a CDN is, it is explained well on his website. What I found interesting is how this would compare to Amazon’s S3; where I’ve seen several people adopt a similar strategy using Amazon’s S3.
Over the last couple nights, I also watched the GAE video on YouTube introduced in Google Campfire One. Parts One, Two and Three.
You can download the GAE SDK here. Pricing is discussed (not confirmed) here.
First part of the problem: How should objects serialize to JSON, and can this be exchanged between different languages (.NET/Python) without writing custom Encode/Decoding implementations?
Second part: Why does Python’s Pickle serialize (reflect) an object, but simplejson which mimics the exact same interface behave differently? Continue reading
I stumbled across this simple UI, Python-newt. Newt which is common to many non-graphic installs on various Linux flavors. Newt is a simplistic UI that lets a programmer specify entry fields, radio buttons, ok/cancel buttons. You name it…
The Python extension is called Snack. Read more on support here. Two examples come with the docs, showing how easy it is to assemble UI entry request pages/forms.