Ask coding questions

← Back to all posts
Import code files to repl
PaulLeger

Hi, I am professor and want to import source code files (C++'s examples) and later share with my students, Is it possible?

Answered by 21natzil [earned 5 cycles]
View Answer
Voters
JULIANCAMILOC12
michaelm0324
Leansutton
MattiaSanti
geofflangenderf
ronakgorasia
vkxleTTV
SophiaFriedman
WooyoungKim1
sabingaire_12
Comments
hotnewtop
21natzil

You can upload files from your computer into a repl, and then have your students fork the repl, so each receives the same copy.

PaulLeger

@21natzil Thanks ... I found the way!

HasanGonen

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.LinkedList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.undo.UndoManager;

public class UndoDemo extends JFrame {

*/

}

[deleted]

RakeshRK9299




leon332157

You can create a new repl and upload your code to it.

PaulLeger

@leon332157 But, I have around 35 files because during a semester I teach many pieces of code. It is possible to upload a batch of sources code?

Mosrod

@PaulLeger Yes, you can upload a folder of source code, and make your students fork that repl in the beginning of a semester, and they will have one repl for the whole semester with all of their files.
https://storage.googleapis.com/replit/images/1536091971976_59f3cf1c6250241787e583a4bee83cd2.gi

PaulLeger

@Mosrod Yes, it is very useful!!!

Following this method, I have many files and want to compile/execute in an isolated way. Is it possible?

Mosrod

@PaulLeger I don't think so, repl.it might add it in the future, but for now, you can rename the file that you want to run to 'main.py'.

Mitchelle_RR

@Mosrod I don't see that option to add folders!! I don't know why.
https://storage.googleapis.com/replit/images/1548104544874_91bd494ad82f63192676500f921bb1ec.pn