Posts Tagged ‘python’

Why Python is so awesome sometimes

Here’s why I totally love python sometimes:

def _callService (self, headers, callback, errback = None, method=’GET’):
# ….
return some_val

def _callServiceGET (*args, **kwargs):
return args[0]._callService (*args[1:], method=’GET’, **kwargs)

def _callServiceHEAD (*args, **kwargs):
return args[0]._callService (*args[1:], method=’HEAD’, **kwargs)

/

Interprocess Synchronization in Python/Linux

I had been looking for a way to synchronize my python cgi scripts (several, or several instances of one) so that only one of them could access a particular table in a database at one time.  I looked around on the internet but didn’t find a concrete class that could do this.  I was writing [...]