[code] Default numbered script names (e.g. script1.py)

When the script name is empty after renaming a script, a default new name is
given. We look for the first available scriptI.py name, with 0<I<100.

Change-Id: If17f1df95c552320c0412ce652e7ae7e0cfd9cbc
This commit is contained in:
Léa Saviot
2017-11-08 13:14:09 +01:00
committed by Romain Goyet
parent 2456c7eeba
commit a19377ad5e
4 changed files with 78 additions and 14 deletions

View File

@@ -2,7 +2,8 @@
namespace Code {
constexpr ScriptTemplate emptyScriptTemplate(".py", R"()");
constexpr ScriptTemplate emptyScriptTemplate(".py", R"(from math import *
)");
constexpr ScriptTemplate factorialScriptTemplate("factorial.py", R"(def factorial(n):
if n == 0: