You are viewing an older version (9.15.0).Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.15.0 / IPython / core / magics / code / CodeMagics / pastebin

function

IPython.core.magics.code:CodeMagics.pastebin

source: /dev/ipython/IPython/core/magics/code.py:253

Signature

def pastebin(self, parameter_s = '')

Summary

Upload code to dpaste.com, returning the URL.

Extended Summary

Usage:\

%pastebin [-d "Custom description"][-e 24] 1-7

The argument can be an input history range, a filename, or the name of a string or macro.

If no arguments are given, uploads the history of this session up to this point.

Options:

-d: Pass a custom description. The default will say

"Pasted from IPython".

-e: Pass number of days for the link to be expired.

The default will be 7 days.

Aliases

  • IPython.core.magics.CodeMagics.pastebin