codeskulptor — replace the codeskulptor module of CodeSkulptor

codeskulptor module.

Replace the codeskulptor module of CodeSkulptor.

Piece of SimpleGUICS2Pygame.

license:GPLv3 — Copyright (C) 2013-2014, 2020-2021 Olivier Pirson
author:Olivier Pirson —
version:May 4, 2021

Return a completed CodeSkulptor URL ressource from a short filename.

Example given in the CodeSkulptor2 file2url documentation: file2url(‘assets-Quick_fox.txt’) returns ‘’

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

Parameters:filename – str
Raise:ValueError if filename is in a incorrect format (the good format is ‘^[a-zA-Z][a-zA-Z0-9]*[_-]’)

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:

Do nothing.

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

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

Parameters:seconds – int >= 0