Saturday, June 27, 2009
Sunday, June 21, 2009
Configure Flags
These are the flags/switches I used with configure.
MySQL on MacCC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" \Don't know why I decided to install the bins under Applications, but I did. Put them where you want. I did install the data dirs under Docs so that my backup backs them up! :)
CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer \
-felide-constructors -fno-exceptions -fno-rtti"
./configure \
--prefix=/Applications/mysql \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-plugins=innobase \
--localstatedir=/Users/<UserName>/Documents/mysql/data
Python 2.4.6 on Mac./configure MACOSX_DEPLOYMENT_TARGET=10.5
Here the PATH statements from .bash_profile and .bash_login:
.bash_profileexport PATH=/usr/local/bin/:/Applications/mysql/bin:$PATH
.bash_loginexport PATH="/usr/local/bin:/usr/local/sbin:/Applications/mysql/bin/:$PATH"
Monday, June 15, 2009
Tuesday, June 2, 2009
LXML on Mac OS X
Thanks to this info on Reinout's blog, I was able to install lxml in just a couple of minutes using buildout!!!!! Previously, I spent hours and hours on it and didn't get it done.
Here the info:
http://reinout.vanrees.org/weblog/2009/03/19/static-lxml-recipe-and-ligbcrypt-works-now.html
And, thanks Reinout! :)
Wednesday, May 13, 2009
WTF, Miss California ?!: As usual, Keith Olbermann got it right!
Visit msnbc.com for Breaking News, World News, and News about the Economy
Wednesday, April 1, 2009
Need to skin your site?
I just found this site called Open Source Templates. They have some very appealing skins for you to choose from.
http://www.OpenSourceTemplates.org/
Tuesday, March 31, 2009
Hugs for Bush
Now, you have to see this. Very funny.... if you watch it all the way to the end. Yes, ALL THE WAY TO THE END.
Thursday, March 26, 2009
Thursday, March 12, 2009
Plone and Unit tests and ZSQL Methods
So, while writing running unit tests for a new class method, a call to a ZSQL method, in the skins folder, kept failing. Then after a long search, I finally found:
http://markmail.org/message/uhh3dhxvypfcnglu#query:plone%20skins%20%22unit%20test%22+page:1+mid:uhh3dhxvypfcnglu+state:results
So, the reason as stated is this:
because in tests new skin layers aren't automatically added to the
default search path on product installation.
So, adding this code to 'afterSetUp' solved everything for me:
def afterSetUp(self):
self._refreshSkinData()
Monday, March 2, 2009
Sunday, March 1, 2009
Python's Yield
Here an example of how I learned to understand generators, 'next' and 'yield':
>>> def create_squared_generator():
... x_range = range( 5 )
... for x in x_range:
... yield x * x
...
>>>
>>> squared_generator = create_squared_generator()
>>>
>>> print squared_generator.next()
0
>>> print squared_generator.next()
1
>>> print squared_generator.next()
4
>>> print squared_generator.next()
9
>>> print squared_generator.next()
16
So, when you get to the end of a generator and call next() again, a StopIteration exception is raised:
>>> print squared_generator.next()
Traceback (most recent call last):
File "<stdin>", line 1, in ?;
StopIteration
In this example, I called next() over and over again until hitting the end of the range. And when tried one more time, I got the exception as mentioned.
This example is not very useful since the generator is limited to range( 5 ). However, if you pass a max size, it becomes more useful:
>>> def create_squared_generator( size ):
... x = 0
... while x < size:
... yield x * x
... x += 1
...
>>> for val in create_squared_generator( 10 ):
... print val
...
0
1
4
9
16
25
36
49
64
81
Actually quite easy once I understood that 'yield' is the same as 'return,' the execution resumes at the spot at which 'yield' returned the previous value, and, the generator can only be used ONCE!
Monday, February 16, 2009
virtualenv
virtualenv is a tool to create isolated Python environments. install it with: easy_install virtualenv
The basic usage is:$ python virtualenv.py ENV
Where ENV is the name of the environment that you want to create.
Or, virtualenv --no-site-packages ENV
Creating the virtual evn this way will not inherit any packages from the site-packages folder. This can be used if you don't have control over site-packages and don't want to depend on the packages there, or you just want more isolation from the global system
Beautiful! :)
Thursday, February 5, 2009
Install Plone using Buildout on Unix-like Evnironments
Weblion has a screencast on how to create a Plone instance using buildout. Very well done. Here it is:
http://weblion.psu.edu/documentation/presentations/buildout/install-plone-using-buildout
Thursday, January 29, 2009
UPDATED: New England Trip (Sans Canada)
View Larger Map
Alexandria, VA
Niagra Falls, NY
Albany, NY
White River Junction, VT
Portland, ME
Manchester, NH
Boston, MA
Provincetown, MA
Newport, RI
Mystic (Mystic Sea Port), CT
New London, CT
Greenport, NY
Southampton, NY
Montauk, NY
Alexandria, VA
Monday, January 26, 2009
Lime Chicken

Lime Chicken
Originally uploaded by [ Hungry Hungry ]
Have a look at this awesome chicken recipe. Gonna try it very soon.