-1

I want to run this command ccloud create topic mytopic using python

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • 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 Answers1

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