This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
block_fun.py
466 lines (453 loc) · 27.4 KB
/
block_fun.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
import os
import run_system_functions
class blockfunctions():
def __init__(self):
self.blockaddress = 0
self.filepath = ''
self.newpath = ''
def find_between(self, filepath, first_word, second_word, occurrence):
file = open(filepath, 'r')
lines = file.readlines()
file.close()
first_line_number = None
second_line_number = None
count = 0
for i, line in enumerate(lines):
if first_word in line:
count += 1
if count == occurrence:
first_line_number = i
if second_word in line and count == occurrence:
second_line_number =i
break
if first_line_number is not None and second_line_number is not None:
words_between = []
for i in range(first_line_number + 1, second_line_number):
line = lines[i].strip()
words_between.append(lines[i])
return words_between
else:
return [] # If either first_word or second_word is not found in the file or occurrence is not found
def pol(self, holder,holderexists,thecode2):
if holderexists == True:
theholder2 = open(f'{holder}','w')
theholder2.write(thecode2)
theholder2.close()
if holderexists == False:
theholder3 = open(f'{holder}','x')
theholder3.close()
theholder2 = open(f'{holder}','w')
theholder2.write(thecode2)
theholder2.close()
def find_betweencode(self, code, first_word, second_word,holder,holderexists:bool, occurrence):
thecode2 = code
self.pol(holder,holderexists,thecode2)
theholder = open(holder, 'r')
lines = theholder.readlines()
theholder.close()
delholdd = open(holder,'w')
delholdd.write('')
delholdd.close
first_line_number = None
second_line_number = None
count = 0
for i, line in enumerate(lines):
if first_word in line:
count += 1
if count == occurrence:
first_line_number = i
if second_word in line and count == occurrence:
second_line_number = i
break
if first_line_number is not None and second_line_number is not None:
words_between = []
for i in range(first_line_number + 1, second_line_number):
line = lines[i].strip()
words_between.append(lines[i])
return words_between
else:
return [] # If either first_word or second_word is not found in the file or occurrence is not found
def find_between3(self, text, firstword, secondword):
start_index = text.find(firstword) + len(firstword)
end_index = text.find(secondword)
if start_index == -1 or end_index == -1:
return None
return text[start_index:end_index]
def list_to_string(self, lst):
string = ''.join(lst)
string = string.replace('\\n', '\n')
return string
def edit_line(self, file_name, line_number, new_text):
"""Edits the specified line in the given Python file.
Args:
file_name: The name of the Python file to edit.
line_number: The number of the line to edit.
new_text: The new text to write to the file.
"""
with open(file_name, "r") as f:
source_code = f.read()
lines = source_code.split("\n")
lines[line_number - 1] = new_text
with open(file_name, "w") as f:
f.write("\n".join(lines))
def pre_makeblock(self, filepath: str, blockinfo: list, where: int, comment: str = None):
"""make block in specific line and file and it create it by using blockinfo that
is a list the first element is the programming language of block the secound one is
address of the block"""
self.filepath = filepath
self.linenumber = where
self.comment = comment
self.blockstarter1 = f'{self.comment}<{blockinfo[0]} s>{blockinfo[1]}'
self.blockender1 = f'{self.comment}<{blockinfo[0]} e>{blockinfo[1]}'
self.blockstarter = self.blockstarter1
self.blockender = self.blockender1
if self.comment == None:
self.blockstarter = self.blockstarter1[4:]
self.blockender = self.blockender1[4:]
if self.comment == 'None':
self.blockstarter = self.blockstarter1[4:]
self.blockender = self.blockender1[4:]
self.edit_line(file_name=self.filepath, line_number=self.linenumber, new_text=f'{self.blockstarter}\n')
self.edit_line(file_name=self.filepath, line_number=self.linenumber + 1, new_text='\n')
self.edit_line(file_name=self.filepath, line_number=self.linenumber + 2, new_text=f'{self.blockender}')
def pre_codeblock(self, filepath: str, blockinfo: list, where: int, code: str, codelines: int, comment: str = None):
"""make block in specific line and file and it create it by using blockinfo that
is a list the first element is the programming language of block the secound one is
address of the block"""
self.filepath = filepath
self.linenumber = where
self.comment = comment
self.blockstarter1 = f'{self.comment}<{blockinfo[0]} s>{blockinfo[1]}'
self.blockender1 = f'{self.comment}<{blockinfo[0]} e>{blockinfo[1]}'
self.blockstarter = self.blockstarter1
self.blockender = self.blockender1
if self.comment == None:
self.blockstarter = self.blockstarter1[4:]
self.blockender = self.blockender1[4:]
if self.comment == 'None':
self.blockstarter = self.blockstarter1[4:]
self.blockender = self.blockender1[4:]
self.edit_line(file_name=self.filepath, line_number=self.linenumber, new_text=f'{self.blockstarter}\n')
self.edit_line(file_name=self.filepath, line_number=self.linenumber + 1, new_text=f'{code}\n')
self.edit_line(file_name=self.filepath, line_number=self.linenumber + 2 + codelines,new_text=f'{self.blockender}')
def blockfile(self, file_name: str, blockinfo: list, datatransferfile: str, datatransferfileformat: str):
self.filepath = file_name
self.openedfile = open(self.filepath, 'r')
self.blockmodule = f'<{blockinfo[0]} s>{blockinfo[1]}'
self.blockmodule1 = f'<{blockinfo[0]} e>{blockinfo[1]}'
if self.blockmodule in self.openedfile.read():
self.code1 = self.find_between(self.filepath, self.blockmodule, self.blockmodule1, 1)
self.code2 = self.list_to_string(self.code1)
self.pl = open(f'{datatransferfile}{datatransferfileformat}', 'a')
print(self.code2, file=self.pl)
self.pl.close()
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
def pre_blockrun(self, file_name: str, blockinfo: list, datatransferfile: str, datatransferfileformat: str, someinfo=None):
"""
note:this one needs file not code
note:the data programming language works only by using the someinfo mode
note:this is the parameters input sequence in the someinfo list
first one: CAROCO
second one: returned
third one: PRDF
forth one: parallelrun
fifth one: showrunmessage
sixth one: showmessageshowingwarnings
seventh one *: datalogfilename
*seventh one is optional for only data programming language run
"""
if someinfo is None:
someinfo = []
self.filepath = file_name
self.openedfile = open(self.filepath, 'r')
self.blockmodule = f'<{blockinfo[0]} s>{blockinfo[1]}'
self.blockmodule1 = f'<{blockinfo[0]} e>{blockinfo[1]}'
if self.blockmodule in self.openedfile.read():
self.code1 = self.find_between(self.filepath, self.blockmodule, self.blockmodule1, 1)
self.code2 = self.list_to_string(self.code1)
self.pl = open(f'{datatransferfile}{datatransferfileformat}', 'a')
print(self.blockmodule, file=self.pl)
print(self.code2, file=self.pl)
print(self.blockmodule1, file=self.pl)
self.pl.close()
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if someinfo == [] or someinfo is None:
if blockinfo[0] == 'python':
run_system_functions.run('python',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'C':
run_system_functions.run('C',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'java':
run_system_functions.run('java',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'html':
run_system_functions.run('html',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'JS':
run_system_functions.run('JS',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'batch':
run_system_functions.run('batch',1,False,f'{datatransferfile}{datatransferfileformat}')
self.datatorun.close()
if someinfo != [] and someinfo is not None:
if blockinfo[0] == 'python':
run_system_functions.run('python', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'C':
run_system_functions.run('C',someinfo[0], someinfo[1],f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'java':
run_system_functions.run('java', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'html':
run_system_functions.run('html', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'JS':
run_system_functions.run('JS', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'batch':
run_system_functions.run('batch', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'data':
run_system_functions.run('data', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5],someinfo[6])
self.datatorun.close()
self.delpl = open(f'{datatransferfile}{datatransferfileformat}','w')
self.delpl.write('')
self.delpl.close()
def pre_blockcoderun(self, code:str,holder, holderexists, blockinfo: list, datatransferfile: str, datatransferfileformat: str, someinfo=None):
"""
note:this one needs code not file
note:the data programming language works only by using the someinfo mode
note:this is the parameters input sequence in the someinfo list
first one: CAROCO
second one: returned
third one: PRDF
forth one: parallelrun
fifth one: showrunmessage
sixth one: showmessageshowingwarnings
seventh one *: datalogfilename
*seventh one is optional for only data programming language run
"""
if someinfo is None:
someinfo = []
self.code = code
self.blockmodule = f'<{blockinfo[0]} s>{blockinfo[1]}'
self.blockmodule1 = f'<{blockinfo[0]} e>{blockinfo[1]}'
if self.blockmodule in self.code:
self.code1 = self.find_betweencode(self.code, self.blockmodule, self.blockmodule1, holder, holderexists, 1)
self.code2 = self.list_to_string(self.code1)
self.pl = open(f'{datatransferfile}{datatransferfileformat}', 'a')
print(self.blockmodule, file=self.pl)
print(self.code2, file=self.pl)
print(self.blockmodule1, file=self.pl)
self.pl.close()
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if someinfo == [] or someinfo is None:
if blockinfo[0] == 'python':
run_system_functions.run('python',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'C':
run_system_functions.run('C',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'java':
run_system_functions.run('java',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'html':
run_system_functions.run('html',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'JS':
run_system_functions.run('JS',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'batch':
run_system_functions.run('batch',1,False,f'{datatransferfile}{datatransferfileformat}')
self.datatorun.close()
if someinfo != [] and someinfo is not None:
if blockinfo[0] == 'python':
run_system_functions.run('python', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3],someinfo[4], someinfo[5])
if blockinfo[0] == 'C':
run_system_functions.run('C',someinfo[0], someinfo[1],f'{datatransferfile}{datatransferfileformat}','',someinfo[3], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'java':
run_system_functions.run('java', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'html':
run_system_functions.run('html', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'JS':
run_system_functions.run('JS', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'batch':
run_system_functions.run('batch', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'data':
run_system_functions.run('data', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5],someinfo[6])
self.datatorun.close()
self.delpl = open(f'{datatransferfile}{datatransferfileformat}','w')
self.delpl.write('')
self.delpl.close()
def pre_blockallrun(self, file_name=None, blockinfo_=None, datatransferfile_=None, datatransferfileformat_=None, someinfo_=None):
"""
note:this one needs file not code
note:the data programming language works only by using the someinfo_ mode
note:this is the parameters input sequence in the someinfo list
first one: CAROCO
second one: returned
third one: PRDF
forth one: parallelrun
fifth one: showrunmessage
sixth one: showmessageshowingwarnings
seventh one *: datalogfilename
*seventh one is optional for only data programming language run
"""
if file_name is None:
file_name = []
if blockinfo_ is None:
blockinfo_ = []
if datatransferfile_ is None:
datatransferfile_ = []
if datatransferfileformat_ is None:
datatransferfileformat_ = []
if someinfo_ is None:
someinfo_ = []
datatransferfile__ = datatransferfile_
datatransferfileformat__ = datatransferfileformat_
for i in range(len(file_name)):
self.filepath = file_name[i]
if someinfo_ != []:
someinfo = someinfo_[i]
else:
someinfo = []
datatransferfile = datatransferfile__[i]
datatransferfileformat = datatransferfileformat__[i]
self.openedfile = open(self.filepath, 'r')
blockinfo = blockinfo_[i]
self.blockmodule = f'<{blockinfo[0]} s>{blockinfo[1]}'
self.blockmodule1 = f'<{blockinfo[0]} e>{blockinfo[1]}'
if self.blockmodule in self.openedfile.read():
self.code1 = self.find_between(self.filepath, self.blockmodule, self.blockmodule1, 1)
self.code2 = self.list_to_string(self.code1)
self.pl = open(f'{datatransferfile}{datatransferfileformat}', 'a')
print(self.blockmodule, file=self.pl)
print(self.code2, file=self.pl)
print(self.blockmodule1, file=self.pl)
self.pl.close()
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if someinfo == [] or someinfo is None:
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if blockinfo[0] == 'python':
run_system_functions.run('python',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'C':
run_system_functions.run('C',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'java':
run_system_functions.run('java',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'html':
run_system_functions.run('html',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'JS':
run_system_functions.run('JS',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'batch':
run_system_functions.run('batch',1,False,f'{datatransferfile}{datatransferfileformat}')
self.datatorun.close()
if someinfo != [] and someinfo is not None:
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if blockinfo[0] == 'python':
run_system_functions.run('python', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'C':
run_system_functions.run('C',someinfo[0], someinfo[1],f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0 ] == 'java':
run_system_functions.run('java', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'html':
run_system_functions.run('html', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'JS':
run_system_functions.run('JS', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'batch':
run_system_functions.run('batch', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'data':
run_system_functions.run('data', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5],someinfo[6])
self.datatorun.close()
self.delpl = open(f'{datatransferfile}{datatransferfileformat}','w')
self.delpl.write('')
self.delpl.close()
def pre_blockcodeallrun(self, code_=None, holder_=None, holderexists_=None, blockinfo_=None, datatransferfile_=None, datatransferfileformat_=None, someinfo_=None):
"""
note:this one needs code not file
note:the data programming language works only by using the someinfo mode
note:this is the parameters input sequence in the someinfo list
first one: CAROCO
second one: returned
third one: PRDF
forth one: parallelrun
fifth one: showrunmessage
sixth one: showmessageshowingwarnings
seventh one *: datalogfilename
*seventh one is optional for only data programming language run
"""
if code_ is None:
code_ = []
if blockinfo_ is None:
blockinfo_ = []
if holder_ is None:
holder_ = []
if holderexists_ is None:
holderexists_ = []
if datatransferfile_ is None:
datatransferfile_ = []
if datatransferfileformat_ is None:
datatransferfileformat_ = []
if someinfo_ is None:
someinfo_ = []
datatransferfile__ = datatransferfile_
datatransferfileformat__ = datatransferfileformat_
for i in range(len(holderexists_)):
self.code = code_[i]
if someinfo_ != []:
someinfo = someinfo_[i]
else:
someinfo = []
holder = holder_[i]
holderexists = holderexists_[i]
datatransferfile = datatransferfile__[i]
datatransferfileformat = datatransferfileformat__[i]
blockinfo = blockinfo_[i]
self.blockmodule = f'<{blockinfo[0]} s>{blockinfo[1]}'
self.blockmodule1 = f'<{blockinfo[0]} e>{blockinfo[1]}'
if self.blockmodule in self.code:
self.code1 = self.find_betweencode(self.code, self.blockmodule, self.blockmodule1, holder, holderexists, 1)
self.code2 = self.list_to_string(self.code1)
self.pl = open(f'{datatransferfile}{datatransferfileformat}', 'a')
print(self.blockmodule, file=self.pl)
print(self.code2, file=self.pl)
print(self.blockmodule1, file=self.pl)
self.pl.close()
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if someinfo == [] or someinfo is None:
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if blockinfo[0] == 'python':
run_system_functions.run('python',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'C':
run_system_functions.run('C',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'java':
run_system_functions.run('java',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'html':
run_system_functions.run('html',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'JS':
run_system_functions.run('JS',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin',1,False,f'{datatransferfile}{datatransferfileformat}')
if blockinfo[0] == 'batch':
run_system_functions.run('batch',1,False,f'{datatransferfile}{datatransferfileformat}')
self.datatorun.close()
if someinfo != [] and someinfo is not None:
self.datatorun = open(f'{datatransferfile}{datatransferfileformat}', 'r')
if blockinfo[0] == 'python':
run_system_functions.run('python', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'C':
run_system_functions.run('C',someinfo[0], someinfo[1],f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0 ] == 'java':
run_system_functions.run('java', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'html':
run_system_functions.run('html', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'JS':
run_system_functions.run('JS', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'kotlin':
run_system_functions.run('kotlin', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'batch':
run_system_functions.run('batch', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5])
if blockinfo[0] == 'data':
run_system_functions.run('data', someinfo[0], someinfo[1], f'{datatransferfile}{datatransferfileformat}','', someinfo[2], someinfo[3], someinfo[4], someinfo[5],someinfo[6])
self.datatorun.close()
self.delpl = open(f'{datatransferfile}{datatransferfileformat}','w')
self.delpl.write('')
self.delpl.close()
blockclass = blockfunctions()