in reply to Wrap around an interactive python script
You can do this through open pipe, but you might run into some buffering problems.
open(LOG,">>/path/to/log"); open(SYS,"/path/to/python/script.py |"); while (<SYS>) { print $_; print LOG $_; } close(SYS); close(LOG);
This way you can print to screen and to your log file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Wrap around an interactive python script
by rastoboy (Monk) on Jul 21, 2010 at 04:08 UTC | |
by ikegami (Patriarch) on Jul 21, 2010 at 14:58 UTC |