Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为python-m定义powershell函数_Python_Powershell - Fatal编程技术网

为python-m定义powershell函数

为python-m定义powershell函数,python,powershell,Python,Powershell,我想做一些我认为微不足道的事情 我只是想声明这样一个函数 function mds { python -m "blabla" $args } 但它只是在powershell下不起作用 我得到 据我所知,powershell将整个python-m“asdfadsf”作为命令,但我为什么以及如何解决它呢 你只是想从PowerShell运行Python脚本?文档中没有提到这一点吗?是的,我只是想为我偶尔运行的东西提供一个简短的别名,没什么大不了的,我只是很惊讶它在Windows下如此晦涩,比如你可能

我想做一些我认为微不足道的事情

我只是想声明这样一个函数

function mds {
python -m "blabla" $args
}
但它只是在powershell下不起作用 我得到


据我所知,powershell将整个python-m“asdfadsf”作为命令,但我为什么以及如何解决它呢

你只是想从PowerShell运行Python脚本?文档中没有提到这一点吗?是的,我只是想为我偶尔运行的东西提供一个简短的别名,没什么大不了的,我只是很惊讶它在Windows下如此晦涩,比如你可能会打电话。
mds : The term 'python -m os:String' is not recognized as the name of a cmdlet, function, script file, or operable program. Ch
eck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1