yt.utilities.lodgeit module

LodgeIt!

A script that pastes stuff into the enzotools pastebin on paste.enzotools.org.

Modified (very, very slightly) from the original script by the authors below.

.lodgeitrc / _lodgeitrc

Under UNIX create a file called ~/.lodgeitrc, under Windows create a file %APPDATA%/_lodgeitrc to override defaults:

language=default_language
clipboard=true/false
open_browser=true/false
encoding=fallback_charset
authors:

2007-2008 Georg Brandl <georg@python.org>, 2006 Armin Ronacher <armin.ronacher@active-4.com>, 2006 Matt Good <matt@matt-good.net>, 2005 Raphael Slinckx <raphael@slinckx.net>

yt.utilities.lodgeit.compile_paste(filenames, langopt)[source]

Create a single paste out of zero, one or multiple files.

yt.utilities.lodgeit.copy_url(url)[source]

Copy the url into the clipboard.

yt.utilities.lodgeit.create_paste(code, language, filename, mimetype, private)[source]

Create a new paste.

yt.utilities.lodgeit.download_paste(uid)[source]

Download a paste given by ID.

yt.utilities.lodgeit.fail(msg, code)[source]

Bail out with an error message.

yt.utilities.lodgeit.get_mimetype(data, filename)[source]

Try to get MIME type from data.

yt.utilities.lodgeit.get_xmlrpc_service()[source]

Create the XMLRPC server proxy and cache it.

yt.utilities.lodgeit.language_exists(language)[source]

Check if a language alias exists.

yt.utilities.lodgeit.load_default_settings()[source]

Load the defaults from the lodgeitrc file.

yt.utilities.lodgeit.main(filename, languages=False, language=None, encoding='utf-8', open_browser=False, private=False, clipboard=False, download=None)[source]

Paste a given script into a pastebin using the Lodgeit tool.

yt.utilities.lodgeit.make_utf8(text, encoding)[source]

Convert a text to UTF-8, brute-force.

yt.utilities.lodgeit.open_webbrowser(url)[source]

Open a new browser window.

yt.utilities.lodgeit.print_languages()[source]

Print a list of all supported languages, with description.