简体   繁体   中英

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?

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?

You certainly can develop for Stackless but there is currently no specialized support for Stackless. This means that you'll find the code editing experience and the REPL window work just fine. But profiling and debugging, which rely upon sys.settrace, won't work for tasklets.

If you install Stackless via the MSIs PTVS will pick up the installation as it would any normal CPython installation. 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.

If you'd like to make this better you can contribute back to PTVS to improve this. Stackless's documentation has information on how to enable debugging and it doesn't look like it'd be too difficult. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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