Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
devwiki:python [2021/12/16 19:20] – [django] ying | devwiki:python [2022/05/02 14:34] – [system command modules] ying | ||
---|---|---|---|
Line 584: | Line 584: | ||
list=[1, | list=[1, | ||
seq=list[:: | seq=list[:: | ||
+ | |||
+ | # list to pair list | ||
+ | info = [' | ||
+ | info_pair = zip(info[:: | ||
+ | # [(' | ||
# list flatten, and remove duplicates | # list flatten, and remove duplicates | ||
Line 1130: | 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 ==== | ||