News for hackers. Stuff that matters.
Re:Show HN: Varnishtuner.py by whalesalad on Saturday April 18, 2015 @05:38PM (#9401160)
One thing I'd suggest right off the bat is psutil. It looks like y'all did a lot of manual work to gather basic system information that you'd get out of the box with psutil. Plus, they've abstracted a lot of the cross-platform inconsistencies.
Re:Show HN: Varnishtuner.py by jjoe on Saturday April 18, 2015 @05:44PM (#9401180)
Believe me, I did consider it. It'd have made things easier a bit. But the goal (as stated in Github) is to not depend on any external module. Execution flow should be to wget && python varnishtuner.py similar to the way mysqltuner.pl works.
Re:Show HN: Varnishtuner.py by drdaeman on Saturday April 18, 2015 @08:39PM (#9401622)
Just a suggestion. If you want a single file - why not package everything as an egg? Something that remotely resembles static linking in compiled languages.

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.

Re:Show HN: Varnishtuner.py by erikrothoff on Saturday April 18, 2015 @06:13PM (#9401285)
Do you have a link to the mysqltuner.pl?
Re:Show HN: Varnishtuner.py by lmz on Saturday April 18, 2015 @06:30PM (#9401341)