codeskulptor — replace the codeskulptor module of CodeSkulptor

codeskulptor module.

Replace the codeskulptor module of CodeSkulptor.

Piece of SimpleGUICS2Pygame. https://bitbucket.org/OPiMedia/simpleguics2pygame

license:GPLv3 — Copyright (C) 2013-2014, 2020 Olivier Pirson
author:Olivier Pirson — http://www.opimedia.be/
version:May 19, 2020
SimpleGUICS2Pygame.codeskulptor.file2url(filename)[source]

Return a completed CodeSkulptor URL ressource from a short filename.

Example given in the CodeSkulptor file2url documentation: file2url(‘assets-Quick_fox.txt’) returns ‘http://codeskulptor-assets.commondatastorage.googleapis.com/assets-Quick_fox.txt’

Example given in the CodeSkulptor3 urllib2-urlopen documentation (there is an error in file2url documentation): file2url(‘assets_sample_text.txt’) returns ‘//codeskulptor-assets.commondatastorage.googleapis.com/assets_sample_text.txt’

Parameters:filename – str
Raise:ValueError if filename is in a incorrect format (the good format is ‘^[a-zA-Z][a-zA-Z0-9]*[_-]’)
Returns:str
SimpleGUICS2Pygame.codeskulptor.randomize_iteration(randomize=True)[source]

Fake implementation. In CodeSkulptor this function modify the default behaviour of iterations on dict and set. In SimpleGUICS2Pygame this function does nothing.

See CodeSkulptor3 randomize_iteration documentation.

(Available in CodeSkulptor but not in CodeSkulptor documentation!)

Randomize bool:
SimpleGUICS2Pygame.codeskulptor.set_timeout(seconds)[source]

Do nothing.

In CodeSkulptor, this function change the timeout imposed on all programs (by default 5 seconds). See CodeSkulptor set_timeout documentation.

(Available in CodeSkulptor and CodeSkulptor3 but not in CodeSkulptor3 documentation!)

Parameters:seconds – int >= 0

[source]