Ask Your Question
0

How to create a catkin workspace through python script?

asked 2017-04-13 06:12:07 -0500

YusraAzhar gravatar image

I want to create catkin workspace and packages through python script instead of the terminal. Any chance anybody tried it? if yes, please help.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-04-13 14:59:53 -0500

yes, for sure, you can with python execute the same commands in a scrypt automatically as if you were typing those by hand on a terminal, just refer to the python doc if you need more specific info

you need to import the os lib and then invoke the os.system

example:

import os
cmd = 'mkdir -p ~/catkin_ws/src'
os.system(cmd)

os.system('catkin_make')

python doc

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-04-13 06:12:07 -0500

Seen: 102 times

Last updated: Apr 13 '17