-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the configuration of redirection easier
Now the configuration of a stream can accept any class and any options to allow more flexibilty. Configuration in the ini should be passed in this form: [watcher:name] ... stream_stdout.class = FileStream stream_stdout.file = filename stream_stdout.refresh_time = 0.3 Same for `stream_stderr` . if the `file` option is passed withut any `class`, the `FileStream` class will be used by default. By default the `refresh_time` is 0.3. The watcher dict created from the ini is: { .. 'stream_stdout': { 'class': FileStream, 'file': 'filename', 'refresh_time': 0.3 } }
- Loading branch information
Showing
8 changed files
with
142 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By using the dict directly, you share the config between all the watchers
This had to be
watcher = copy.deepcopy(WATCHER_DEFAULTS)
deepcopy is needed because the dict contains dict's
A function returning the defaults is a better option IMHO.