0

Currently, I am using this command to run the ssh server for remote port forwarding using Serveo

subprocess.call('ssh -R 80:127.0.0.1:5000 serveo.net', shell=True)

I need to extract the URL from the ssh command and assign it into a variable. Is there any way to get the output?

DanielSeow
  • 416
  • 1
  • 3
  • 8

1 Answers1

-1

With the bash module:

import bash
b = bash('ls tests.py')
b.stdout 'tests.py\n'
b.stderr ''
Das_Geek
  • 2,775
  • 7
  • 20
  • 26
stef toto
  • 1
  • 1