repl.it
@johnstev111/

Javascript

Python

A Javascript Test, written in python

fork
loading
Files
  • main.py
  • Japy
  • hello_world.japy
  • Quick.py
main.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
filed = input("File to run:")
lines = open(filed).read()
current = 0;
run = lines[current]
End = "false";
Last_in = 0;
num_lines=0;
with open(filed, 'r') as f: 
  for line in f: 
    num_lines += 1
import replit
replit.clear()
run = lines
run=run.replace("alert","print")
run=run.replace("console.log","print")
run=run.replace("prompt","input")
run=run.replace("function","def")
run=run.replace("{",":")
run=run.replace("}","")
run=run.replace("var ","")
f = open("Quick.py", "w")
f.write(run)
f.close() 
exec(open("Quick.py").read())
f = open("Quick.py", "w")
f.close()