[apps/code] Use a special char to position the cursor in Python commands

Change-Id: I7ae3d6098160212d8683a671c78d3bdb937fb701
This commit is contained in:
Léa Saviot
2018-04-23 15:54:31 +02:00
parent 912d084130
commit fd3a2c3cbc
2 changed files with 3 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ ForInRange2ArgsLoop = "for i in range(,):\n "
ForInRange2ArgsLoopWithArg = "for i in range(start, stop):\n instruction"
ForInRange1ArgLoop = "for i in range():\n "
ForInRange1ArgLoopWithArg = "for i in range(size):\n instruction"
PythonCommandDef = "def ():\n "
PythonCommandDef = "def ():\n "
PythonCommandDefWithArg = "def function(x):"
PythonCommandReturn = "return "
RandomModule = "random"

View File

@@ -12,7 +12,8 @@ ion_special_characters = {
u'μ': "Ion::Charset::SmallMu",
u'σ': "Ion::Charset::SmallSigma",
u'': "Ion::Charset::LessEqual",
u'': "Ion::Charset::AlmostEqual"
u'': "Ion::Charset::AlmostEqual",
u'': "Ion::Charset::Empty"
}
def ion_char(i18n_letter):