I want to run this command ccloud create topic mytopic
using python
Asked
Active
Viewed 29 times
-1

OneCricketeer
- 179,855
- 19
- 132
- 245

Mehmood ulhassan
- 1
- 1
-
Have you done **any research whatsoever** on how to run command line commands in Python? Any? – MattDMo Aug 08 '21 at 20:15
-
Does this answer your question? [How to execute a program or call a system command?](https://stackoverflow.com/questions/89228/how-to-execute-a-program-or-call-a-system-command) – MattDMo Aug 08 '21 at 20:16
1 Answers
0
You can create topics using actual Python Kafka clients, so you shouldn't need this command.
But, assuming you still wanted to use it, you'd use subprocess module to run exactly that string, as commented

OneCricketeer
- 179,855
- 19
- 132
- 245