Skip to content

Commit 3fc453f

Browse files
committed
Modules used located in workspace
1 parent 14ed36a commit 3fc453f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

manager/manager/manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import re
88
import psutil
9+
import shutil
910
import time
1011
if ("noetic" in str(subprocess.check_output(['bash', '-c', 'echo $ROS_DISTRO']))):
1112
import rosservice
@@ -201,7 +202,10 @@ def on_run_application(self, event):
201202
f.close()
202203

203204
self.unpause_sim()
204-
self.application_process = subprocess.Popen(["python3", application_file], stdout=sys.stdout, stderr=subprocess.STDOUT,
205+
shutil.copyfile(application_file, "/workspace/code/exercise.py")
206+
application_folder = application_file.replace("/exercise.py", "")
207+
shutil.copytree(application_folder, "/workspace/code", dirs_exist_ok=True)
208+
self.application_process = subprocess.Popen(["python3", "/workspace/code/exercise.py"], stdout=sys.stdout, stderr=subprocess.STDOUT,
205209
bufsize=1024, universal_newlines=True)
206210
else:
207211
print('errors')

0 commit comments

Comments
 (0)