3 ms·
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
by whalesalad 12y ago
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.
- jjoe 12y agoBelieve 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.
- erikrothoff 12y agoDo you have a link to the mysqltuner.pl?
- lmz 12y agohttp://mysqltuner.pl http://mysqltuner.pl (seriously).
- deleted 12y ago[deleted]
- drdaeman 12y agoJust 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.