How to use python to write a script that automatically performs specific steps?

to use a tool called swagger-ui at present, you need to open the swagger folder on the desktop, then open the terminal, type http-server, and then copy the address on the server to the browser to run

.

clipboard.png

is there a way to write a script to generate an executable file that you can do directly to automatically open the browser, or you can take a step back and automatically open the file and enter the http-server command and enter

=
Thank you
to fix this, I think I should learn CPP

sometime.
May.29,2021

general idea:
add the xxx.py file to crontab, or use supervisor to manage the process
and then execute subprocess.call ('http-server')
in xxx.py is not very strict, but this idea can achieve

.
Menu