简体   繁体   English

使用适用于Visual Studio的Python工具进行无堆栈Python开发

[英]Stackless Python development using Python Tools for Visual Studio

Does the Python Tools for Visual Studio Beta , which includes support for CPython, allow you to develop in Stackless Python? Visual Studio BetaPython工具(包括对CPython的支持)是否允许您使用无堆栈Python开发?

If so, could you expand your answers to include any of the steps necessary to set a Stackless Python environment up beyond installing PTVS on an existing VS2010 installation please? 如果是这样,除了在现有VS2010安装上安装PTVS以外,您是否可以扩展答案以包括设置无堆栈Python环境所需的任何步骤?

You certainly can develop for Stackless but there is currently no specialized support for Stackless. 您当然可以为Stackless开发,但是目前没有针对Stackless的专门支持。 This means that you'll find the code editing experience and the REPL window work just fine. 这意味着您将发现代码编辑经验,并且REPL窗口也可以正常工作。 But profiling and debugging, which rely upon sys.settrace, won't work for tasklets. 但是,依赖sys.settrace的性能分析和调试不适用于tasklet。

If you install Stackless via the MSIs PTVS will pick up the installation as it would any normal CPython installation. 如果您通过MSI安装Stackless,则PTVS将像正常的CPython安装一样进行安装。 If you've installed it via some other mechanism you'll need go to Tools->Options->Python Tools->Interpreter Options and setup a custom interpreter using the Add Interpreter button. 如果通过其他机制安装了它,则需要转到工具->选项-> Python工具->解释器选项,然后使用添加解释器按钮设置自定义解释器。

If you'd like to make this better you can contribute back to PTVS to improve this. 如果您想做得更好,可以向PTVS做出贡献以改善这一点。 Stackless's documentation has information on how to enable debugging and it doesn't look like it'd be too difficult. Stackless的文档提供了有关如何启用调试的信息 ,而且看起来不太困难。 From the PTVS stand point this would just involve updating visualstudio_py_debugger.py to detect that it's running on Stackless and add the appropriate code and make sure it works. 从PTVS的角度来看,这仅涉及更新visualstudio_py_debugger.py以检测其是否在Stackless上运行,并添加适当的代码并确保其正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM