Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
devwiki:python [2022/04/17 05:24] – [data operation] ying | devwiki:python [2022/05/02 14:34] – [system command modules] ying | ||
---|---|---|---|
Line 1135: | Line 1135: | ||
subprocess.Popen([r' | subprocess.Popen([r' | ||
</ | </ | ||
+ | * subprocess a console app and get return, and optionally hide the pop up console when call <code pyhton> | ||
+ | # hide popup console for win platform only | ||
+ | startupinfo = subprocess.STARTUPINFO() | ||
+ | startupinfo.dwFlags |= 1 # | ||
+ | # startupinfo.wShowWindow = subprocess.SW_HIDE #(optional) | ||
+ | info=subprocess.Popen( ' | ||
+ | out, err = info.communicate() | ||
+ | </ | ||
==== string related ==== | ==== string related ==== | ||