 |

 |
| |
 |
 |
 |
 |
|
 |
 |
I've started playing around with minor projects in my personal launchpad space, partially to try out bzr. Most recently I wrote a hack, temporarily named "pyexport", which allows you to control the names which your library module namespaces export to application code. So far, I've implemented a few features. export.alias(), which registers an alias for a method in another module that will not be imported until that module is imported,export.explicitly(), a convenience function which makes cooperating with __all__ easyexport.internal(), which marks a module as "internal", and warns any application code (code outside the package which defines the module) which tries to import itexport.restrict(), a method which prevents "leakage" of extraneous imported or private names - for example, if you have a module 'foo' which imports 'sys', you can normally do 'from foo import sys' in Python and get a result.
export.singleton(), which replaces the calling module with a proxy that shares a namespace between the given singleton and the module itself.
It'll be some work to turn this rough prototype into something really usable for a large system like Twisted; at the very least it will need to be rebuilt test-first and integrated with the pydoctor and pydoc documentation tools. Let me know what you think, and if I should pursue it! Tags: code, python, twisted
|
 |
 |
 |
 |
|
 |
 |



 |
| |
 |
 |
 |
 |
|
 |
 |
As predicted, members of my family and various friends were better to me than I deserve on my birthday. I have yet to figure out exactly which features to fund, but I think that I'm going to be giving out small prizes, probably in $20US increments, for each one. For those of you across the puddle, that's about €0.02 at a time - but it's still enough to buy dinner over here. Thanks to everyone who sent a donation in, and thanks especially to Kim, who trudged up to Boston and helped contain the hellmouth in my apartment. (As any ADD sufferer will testify, piles are the enemy. When one's cohabitant has an entire house and 3 whole lifetimes worth of stuff to pile up, the piles can set you up for a crushing and continuous defeat, which is definitely no good for one's mental health, creating a feedback loop where one is discouraged or even afraid to organize things.) Kim defeated even the piles which we had made an uneasy truce with, the ones which we had actively tried to clean up before and had been resigned to treat as simply a messy storage solution rather than a problem. With the piles trapped and cornered, the floors are walkable and the surfaces usable. Who knew that using a vacuum cleaner could be so much fun? Tags: photos, twisted Current Mood: thankful Current Music: Sunspots (by Nine Inch Nails on "With Teeth")
|
 |
 |
 |
 |
|
 |
 |

|
 |
|
 |