Skip to content
← Back to Community
Can I reference another repl from one
Profile icon
TrevorHurst2

I have this raycasting program and I'd like to import some of it's classes from another repl, is there any way I can do this other than copying the files to the other?

Answered by lynnlo [earned 5 cycles]
View Answer
Voters
Profile icon
AadarshPatel2
Profile icon
TrevorHurst2
Comments
hotnewtop
Profile icon
lynnlo

Copy the file and paste it into this repl.
You can then use import {$name_of_pythonfile}.py and then {$name_of_pythonfile}.{$name_of_pythonfunction}() to get the methods from another file.

Profile icon
Roar123

I'd recommend just copying and pasting it if you don't want to turn your other repl into a flask server with the code and then send a get request to it.

Profile icon
SixBeeps

No