Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 691
Kynth Avatar asked Apr 07 '11 14:04

Kynth


People also ask

Is Visual Studio good for Python development?

One of the coolest code editors available to programmers, Visual Studio Code, is an open-source, extensible, light-weight editor available on all platforms. It's these qualities that make Visual Studio Code from Microsoft very popular, and a great platform for Python development.

What Visual Studio should I download for Python?

Python support is presently available only on Visual Studio for Windows. On Mac and Linux, Python support is available through Visual Studio Code. Download and run the latest Visual Studio installer for Windows.


1 Answers

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.

like image 119
Dino Viehland Avatar answered Oct 03 '22 08:10

Dino Viehland