-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #794 from wwang-chcn/suite_modular
Move Bento analysis part here from GiottoClass
- Loading branch information
Showing
2 changed files
with
451 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import sys | ||
import time | ||
|
||
|
||
def get_current_time() -> str: | ||
return time.strftime('%H:%M:%S', time.localtime()) | ||
|
||
|
||
def write_direct_message(message: str): | ||
curr_time_str = get_current_time() | ||
sys.stdout.write(f'{curr_time_str} --- {message}\n') | ||
sys.stdout.flush() | ||
|
||
|
||
def debug(message: str): | ||
write_direct_message(f'DEBUG: {message}') | ||
|
||
|
||
def info(message: str): | ||
write_direct_message(f'INFO: {message}') | ||
|
||
|
||
def write_direct_message_err(message: str): | ||
curr_time_str = get_current_time() | ||
sys.stderr.write(f'{curr_time_str} --- {message}\n') | ||
sys.stderr.flush() | ||
|
||
|
||
def warning(message: str): | ||
write_direct_message_err(f'WARNING: {message}') | ||
|
||
|
||
def error(message: str): | ||
write_direct_message_err(f'ERROR: {message}') | ||
|
||
|
||
def critical(message: str): | ||
write_direct_message_err(f'CRITICAL: {message}') | ||
|
||
|
||
__all__ = ['debug', 'info', 'warning', 'error', 'critical'] |
Oops, something went wrong.