Commands in GoldenDict – Offline Dictionary of man, grep, pupppet help and your commands

NEW: There is a new, better version of this article and program. Add Python reference, man pages and your own commands to dictionary. This example shows how to add commands as dictionaries to GoldenDict. Commands show information for the exact … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | Comments Off on Commands in GoldenDict – Offline Dictionary of man, grep, pupppet help and your commands

Python RegEx One-Liner in a Pipe – Remove Hard Line Wrapping – No Perl

Just put Python in your pipe and let Perl rest in peace. Python can be used as a one-liner in a pipe. Replacing text with a regular expression used to be the last holdout of perl, but now you can … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Comments Off on Python RegEx One-Liner in a Pipe – Remove Hard Line Wrapping – No Perl

Capture Program Output on Python – subprocess.check_output()

Run an external program, capture output. With pipe support. Prequisites: command line, Python hello world. One Liner Well, two lines if you count module import. Try it out in a python console: $ python >>> import subprocess >>> subprocess.check_output(“echo hello … Continue reading

Posted in Uncategorized | Tagged , , , , , | Comments Off on Capture Program Output on Python – subprocess.check_output()