Show HN: Varnishtuner.py
github.com
github.com
class CPUInfo(dict):
def __init__(self, *args):
dict.__init__(self, args)
def __getitem__(self, key):
val = dict.__getitem__(self, key)
return val
def __setitem__(self, key, val):
dict.__setitem__(self, key, val)
Different from: class CPUInfo(dict):
pass
Doesn't the overrides behave just like dict does?I mean, as a part of build process[1] create a ZIP file, containinng all the dependencies and a file called `__main__.py`. Name that file `varnishturner.egg`, and just `python varnishturner.egg` would do the trick.
Or you can ignore this arcane approach suggestion and just publish on PyPI. I suppose Python installations without pip (or at least easy_install) are rare sights.
___
[1] Custom `Makefile`s to the rescue, or there's `bdist_egg` in distutils, although you'd have to write dependency packaging logic by yourself. For example, you can check how lxml does this with their `STATICDEPS=True python setup.py bdist_egg` process.