Skip to main content

IPython magic function to print date/time stamps andvarious system information.

Project description

An IPython magic extension for printing date and time stamps, version numbers, and hardware information.

Sections

Examples

[top]

More examples can be found in this IPython notebook.

Installation and updating

[top]

The watermark line magic can be directly installed via pip

pip install ipyext

or directly from GitHub

pip install git+git://github.com/rasbt/watermark.git#egg=watermark

Usage

[top]

After successful installation, the watermark magic extension can be loaded via:

%load_ext watermark

To get an overview of all available commands, type:

%watermark?
%watermark [-a AUTHOR] [-d] [-n] [-t] [-z] [-u] [-c CUSTOM_TIME] [-v]
                 [-p PACKAGES] [-h] [-m] [-g]


IPython magic function to print date/time stamps
and various system information.

    watermark version 1.2.3

    optional arguments:
      -a AUTHOR, --author AUTHOR
                            prints author name
      -d, --date            prints current date as YYYY-MM-DD
      -n, --datename        prints date with abbrv. day and month names
      -t, --time            prints current time as HH-MM-DD
      -z, --timezone        appends the local time zone
      -u, --updated         appends a string "Last updated: "
      -c CUSTOM_TIME, --custom_time CUSTOM_TIME
                            prints a valid strftime() string
      -v, --python          prints Python and IPython version
      -p PACKAGES, --packages PACKAGES
                            prints versions of specified Python modules and
                            packages
      -h, --hostname        prints the host name
      -m, --machine         prints system and machine info
      -g, --githash         prints current Git commit hash
      -w, --watermark       prints the current version of watermark

Changelog

[top]

v. 1.2.3 (Jan 29, 2016)

  • Changed to a

  • Released the new version under a more permissive newBSD license

v. 1.2.2 (Jun 17, 2015)

  • Changed the default date-format of -d, --date to MM/DD/YYYY, the format DD/MM/YYYY can be used via the shortcut -e, --eurodate.

v. 1.2.1 (Mar 3, 2015)

  • Small bugfix to allow custom time string formatting.

v. 1.2.0 (Oct 01, 2014)

  • --watermark command added to print the current version of watermark.

  • Print author name on a separate line

  • Fixed bug that day takes the same value as the minute if the -n flag is used.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

watermark-1.2.3.zip (4.9 kB view hashes)

Uploaded Source

watermark-1.2.3.tar.gz (2.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page