Who's online

There are currently 0 users and 0 guests online.

Powered By










Python: Setting up a TurboGears Application Under Shared Namespace

Summary

I came across an issue today whilst trying to get a TurboGears application setup, and that is... how do you setup a TurboGears applications as part of a bigger application. Meaning, the overall project has multiple parts: The web frontend (TurboGears), the command line client, etc. I found that using paster to get a TurboGears application created in the way isn't the most straight forward thing in the world.

Four Hours Wasted Over a Parenthesis! (Python + SQLAlchemy)

I've spent the last half day banging my head against the wall wondering 'WTF!?'. I'm working on a semi-complex pluggable framework type application. As part of this app, I have a shared database handler. So of course, I thought there was something underlying with SQLA that was limiting me from being able to accomplish the task as I sawr it in my head. I tried so many combination of mapping classes to database tables, and no matter what I would get the following exception:


raise exc.UnmappedInstanceError(instance)

Python: Converting Bytes to Tb/Gb/Mb/Kb

Just dropping a quick entry here, so I can find it later. Maybe later on I'll elaborate more on some similar stuff.

This is just a quick example I wrote of taking bytes, and converting them to human readable sizes:


def convert_bytes(bytes):
bytes = float(bytes)
if bytes >= 1099511627776:
terabytes = bytes / 1099511627776
size = '%.2fT' % terabytes
elif bytes >= 1073741824:
gigabytes = bytes / 1073741824
size = '%.2fG' % gigabytes
elif bytes >= 1048576:
megabytes = bytes / 1048576

Python: Howto Build a Debian Package for Python Applications

In my feeble attempt to finally learn how to create .deb packages for Debian/Ubuntu I've found that I seem to be a complete johnny at it. I've been an RPM Developer for the last two and a half years, so you have to cut me some slack... going from _a_ rpm spec file to this .deb craziness is beyond me. Hopefully after this weekend I will be less of a johnny, and have a grasp on the subject of creating Debian/Ubuntu packages.

LSI MegaCLI Emergency Cheat Sheet

Recently I've had to do extensive work with Dell PowerEdge servers, and specifically dells that use the LSI MegaRAID controllers. Anyone who has ever had to work with the LSI RAID controllers knows that the MegaCLI provided by LSI is the most cryptic command line utility in existence.

You don't believe me do you?


~]# MegaCLI -help

MegaCLI SAS RAID Management Tool Ver 1.01.39 Aug 01, 2007

(c)Copyright 2007, LSI Logic Corporation, All Rights Reserved.
MegaCli -v
MegaCli -help|-h|?
MegaCli -adpCount

Linux: Dell's "omreport storage controller" Degraded State Issue

System

* Redhat Enterprise Linux (multiple versions)

Note that I am bouncing around on different boxes, please keep versioning agnostic... In general I'm talking about 'an older version' ... not specific versions in general. Our goal here is to get the kernel module for the RAID controller updated to resolve our issue.

RPM: Good Reference on Triggers... and Everything Else.

Just came across a great resource on RPM Triggers at rpm.org:

* http://rpm.org/api/4.4.2.2/triggers.html



Triggers can be a blurry subject, and I had never seen this reference before. To that note, anyone wanting to really dig deep into RPM.. the entire RPM documentation is an excellent resource:

* http://rpm.org/api/4.4.2.2/index.html



SPAM on the site... Working on it...

Sorry all for the comment spam... working on cleaning it all up now, and preventing that in the future. Thank you to all the scum bastard spammers in the world for keeping us all employed... douche bags.

Redhat: up2date --show-groups Does Nothing!

Not being on rhel 3/4 that much these days, I don't get the pleasure of dealing with up2date on a daily basis anymore. At first, when Redhat introduced Yum in el5 I thought, "what was wrong with up2date???". Now, looking back on how limited up2date is... I retract my initial statement.

That said, every now and again I come across the following issue:

# up2date --show-groups


Python - Automatic Script Creation with setuptools

Overview

This article is a continuation of Getting Started with setuptools.


entry_points are a dictionary mapping entry point group names to strings or lists of strings defining the entry points. Entry points are used to support dynamic discovery of services or plugins provided by a project. See Dynamic Discovery of Services and Plugins for details and examples of the format of this argument. In addition, this keyword is used to support Automatic Script Creation.

Syndicate content

5dollarwhitebox.org is not responsible in anyway for actions performed based on information found on this site.

Powered by Drupal - Design by Artinet