Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
python library for writing progress texts, echo messages, warnings and errors to standard output
Python Library for writing progress texts, echo messages, warnings and errors to standard output
Examples:
from screenwriter import Screenwriter
sw = Screenwriter ()
sw.echo ('my output')
Output:
2019-07-26-11:16:04 my output
from screenwriter import Screenwriter
sw = Screenwriter ('%Y-%m-%d %H:%M:%S.%f ')
sw.echo ('my output')
Output:
2019-07-26 11:16:04 my output
from screenwriter import Screenwriter
sw = Screenwriter ()
sw.error ('an error message')
sw.warn ('a warming message')
sw.info ('an informational message')
Output:
2019-07-29-11:39:00 ERROR: an error message
2019-07-29-11:39:00 WARN: a warming message
2019-07-29-11:39:00 INFO: an informational message
By default, log strings are trimmed to 120 chars. You can change this setting:
from screenwriter import Screenwriter
sw = Screenwriter ()
sw.set_maxlen (80) #Set maximum length to 80
You can toggle the output between ON and OFF.
from screenwriter import Screenwriter
sw = Screenwriter ()
sw.echo ('print this line')
sw.set_verbose (False)
sw.echo ('do not print this line')
sw.set_verbose (True)
sw.echo ('print this line')
Output:
2019-10-05-20:09:10 print this line
2019-10-05-20:09:10 print this line
For format options, see http://strftime.org/
FAQs
python library for writing progress texts, echo messages, warnings and errors to standard output
We found that screenwriter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.