In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to call powershell in python. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
* used to call the IPC API of the lookup artifact everything:
#-*-coding: utf-8-*-import osimport timeimport tracebackimport subprocessdef run_cmd (cmd): print 'CMD:%s'% cmd args=cmd p=subprocess.Popen (args Stdout=subprocess.PIPE) dt=p.stdout.read () return dtsearch_name = 'jiangkun'cmd = "C:\ Users\ jiang-kun\ Downloads\ es\ es" real_cmd = cmd+'-I' + search_nameline_list = run_cmd (real_cmd) .split ('n') print len (line_list) lenth = len (line_list) for i in range (lenth): print "% s:% s"% (I, line_ list [I]) print line_list [1]
The everything process must exist in order to use it, but it's pretty good, and you can extend the functionality yourself if necessary. Of course, you still need to use everything's fast index.
After reading the above, do you have any further understanding of how to call powershell in python? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.