Sfoglia il codice sorgente

enhance: preload general packages (#3567)

tags/0.6.4
Yeuoly 1 anno fa
parent
commit
c7de51ca9a
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 22 aggiunte e 2 eliminazioni
  1. 22
    2
      api/core/helper/code_executor/python_transformer.py

+ 22
- 2
api/core/helper/code_executor/python_transformer.py Vedi File

@@ -20,8 +20,28 @@ result = f'''<<RESULT>>
print(result)
"""

PYTHON_PRELOAD = """"""

PYTHON_PRELOAD = """
# prepare general imports
import json
import datetime
import math
import random
import re
import string
import sys
import time
import traceback
import uuid
import os
import base64
import hashlib
import hmac
import binascii
import collections
import functools
import operator
import itertools
"""

class PythonTemplateTransformer(TemplateTransformer):
@classmethod

Loading…
Annulla
Salva