Commit Graph

11 Commits

Author SHA1 Message Date
Wirawan Purwanto
2e21e2857a * Added function relpath() to compute relative path from one to another
path.
2013-06-25 17:01:26 -04:00
Wirawan Purwanto
17d242213d * Added some useful functions from my pw2g_bench_MnO.py scriptlet collection:
- wpylib.math.roundup()
  - wpylib.shell_tools.dirname2()

* file_exists_nonempty() is moved to wpylib.shell_tools.
2012-07-25 09:40:37 -04:00
Wirawan Purwanto
606214eb66 * Changing all isinstance(STUFF, str)' to isinstance(STUFF, basestring)'
for future-proofing this code.
2012-04-13 17:10:32 -04:00
wirawan
2303ad8d0b * pipe_in (subprocess version): added "flush" method. 2010-10-25 14:41:39 +00:00
wirawan
a6582aa8f2 * pipe_in() for "piping in" input to an external command.
* system() like os.system() except with error checking.
* getenv() to get look for a value from a list of environment variables--
  they are searched sequentially in definite order.
2010-05-28 18:45:51 +00:00
wirawan
9e7eeca3a2 * import_commands now will *NOT* override built-in python names (like dir,
id). Otherwise, this will result in disaster.
2010-02-19 18:40:19 +00:00
wirawan
599401a543 * Include *all* coreutils as the repertoire of the shell_tool commands.
* Added sorted_glob to return sorted list of globbed files. Needed for
  this script to run on older python 2.3-based systems.
2010-02-08 19:57:35 +00:00
wirawan
3a22bb1e99 * Added backward compatibility/support for python 2.3 or older.
* Added more general-purpose (some coreutils, grep, less, etc.) Linux commands
  into the namespace for ease of use in regular python.
2010-01-20 21:27:41 +00:00
wirawan
d27c00e979 * Added pipe_out to pass the output of a spawn command to python.
This is equivalent to backtick operator with optional line splitting.
2010-01-20 17:25:54 +00:00
wirawan
b8c378cc14 * Facilitate invocation of some GNU coreutil programs in my python scripts. 2010-01-18 20:55:44 +00:00
wirawan
3609a5b95b * Module wpylib.shell_tools will contain common utilities similar to those
that I have been using in my shell.
* Function added: mcd.
2010-01-08 18:43:06 +00:00