google/tie

Doesn't have a real Python interpreter

Closed this issue · 3 comments

It doesn't support built-in libraries, such as re for regex, etc... So you can't fully use Python as you should do.

Hi @arguiot, TIE uses a third-party library called Skulpt for browser emulation of Python. You're right that it does not support all the standard Python libraries, but I've just tested the current version and it does support re.

Would you mind pasting the snippet of code that does not work, so that we can investigate further? Thank you in advance.

@seanlip I had trouble with:

import re
def reverseWords(s):
    words = s.split()
    array = []
    for i in words:
        arr = list(i)
        p = re.compile("^[\sa-zA-Z0-9ÀÂÇÈÉÊËÎÔÙÛàâçèéêëîôöùû\.\(\)\[\]\"\'\-,;:\/!\?]+$") # regex found online
        if p.match(arr[-1]):
            buff = arr[-1]
            del arr[-1]
            array.append("".join(reversed(arr)) + buff)
        else:
            array.append("".join(reversed(arr)))
    return " ".join(array)

On the first exercise.

Thanks for the example, @arguiot! #527 should fix this.