[英]How to run a Python shell in azure app service
In Azure App Service , I knew there is a Kudu debug console like the following: 在Azure App Service中 ,我知道有一个Kudu调试控制台 ,如下所示:
Can be used to trigger commands in that console. 可用于在该控制台中触发命令。
but I found this console will be gotten stuck if I trigger a python shell like this: 但是如果我触发这样的python shell,我发现这个控制台会被卡住:
D:\\home\\site\\wwwroot\\env\\Scripts>python.exe d:\\家\\网站\\ wwwroot的\\ ENV \\脚本> python.exe
Is it possible having an interactive python shell under azure app service like Heroku ? 是否可以在像Heroku这样的天蓝应用服务下使用交互式python shell? Thank you. 谢谢。
Unfortunately, this is not something that will work in Kudu Console today. 不幸的是,这不是今天在Kudu Console中可行的。 The problem is that Kudu Console is not a true shell, and does have some limitations when it comes to running interactive commands. 问题是Kudu Console不是一个真正的shell,并且在运行交互式命令时确实有一些限制。
As a workaround you can run python with the command flag like so 作为一种解决方法,您可以使用命令标志运行python,就像这样
d:\home>python -c "import os;print(os.environ)"
although unless there is a way or trick to create multline on Kudu Console you would be limited to python without indentation 虽然除非有一种方法或技巧可以在Kudu控制台上创建多线,但你可以限制为没有缩进的python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.