IIS 上的 python cgi

发布于 2024-07-05 06:50:30 字数 328 浏览 7 评论 0原文

如何设置 IIS 以便可以从 asp 页面调用 python 脚本?

好吧,我在这里找到了这个问题的答案:http://support.microsoft.com/kb/276494

接下来是我的下一个问题:如何从在经典的 asp (vb) 代码中? 特别是不在网络根目录中的一个。

How do you set up IIS so that you can call python scripts from asp pages?

Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494

So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回心转意 2024-07-12 06:50:30

你也可以这样做 这个方式

You could also do it this way.

你好,陌生人 2024-07-12 06:50:30

我不相信 IIS 托管的 VBScript 有任何执行外部进程的方法。 如果您使用 python 作为 AXscripting 引擎,那么您可以只使用 sys 模块。 如果您调用的脚本实际上是一个 cgi 脚本,您将必须模仿 cgi 使用的所有环境变量。 另一种方法是将脚本放在 python 路径上,导入它,并希望它足够模块化,以便您可以调用所需的部分并绕过 cgi 处理代码。

I don't believe that VBScript as hosted by IIS has any way of executing an external process. If you are using python as an AXscripting engine then you could just use the sys module. If the script you're calling is actually meant to be a cgi script you'll have to mimic all the environment variables that the cgi uses. The alternative is to put the script on the python path, import it and hope that it is modular enough that you can call the pieces you need and bypass the cgi handling code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文