@mat1/

repl test

Python

No description

fork
loading
Files
  • main.py
  • repls.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6880993775581783","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcGxzCmltcG9ydCBhc3luY2lvCgphc3luYyBkZWYgbWFpbigpOgoJcmVwbCA9IHJlcGxzLlJlcGwoJ2h0dHBzOi8vcmVwbC5pdC9AbWF0MS9yZXBsLXRlc3QnKQoJYXdhaXQgcmVwbC5sb2FkKCkKCWZpbGVzID0gYXdhaXQgcmVwbC5nZXRfZmlsZXMoKQoJIyB1c2UgYXdhaXQgcmVwbC5nZXRfZmlsZShmaWxlbmFtZSkgdG8gcmVhZCBmaWxlcwoJZm9yIGYgaW4gZmlsZXM6CgkJcHJpbnQoc3RyKGYpKQoJCXByaW50KGF3YWl0IGYucmVhZCgpKQoJCXByaW50KCdcblxuXG5cbicpCmxvb3AgPSBhc3luY2lvLmdldF9ldmVudF9sb29wKCkKbG9vcC5ydW5fdW50aWxfY29tcGxldGUobWFpbigpKQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import repls
import asyncio

async def main():
	repl = repls.Repl('https://repl.it/@mat1/repl-test')
	await repl.load()
	files = await repl.get_files()
	# use await repl.get_file(filename) to read files
	for f in files:
		print(str(f))
		print(await f.read())
		print('\n\n\n\n')
loop = asyncio.get_event_loop()
loop.run_until_complete(main())