Questions tagged [ptvs]

Python Tools for Visual Studio turns Visual Studio into a Python IDE. It's a free & open source plug-in for Visual Studio, written and supported by Microsoft and community.

Python Tools for Visual Studio turns Visual Studio into a Python IDE. It's a free & open source plug-in for Visual Studio from Microsoft. PTVS enables developers to use all the major productivity features of Visual Studio to build Python code using either CPython or IronPython and adds new features such as attaching to running Python processes and debugging mixed Python/C++ code.

212 questions
65
votes
6 answers

Can pip be used with Python Tools in Visual Studio?

I'm collaborating with some fellow students to build a python app, and was hoping to use the 'training wheels' of Visual Studio intelli-sense. They use python on mac and linux, so ideally our source control repo would consist of just *.py source…
Matt
  • 3,676
  • 3
  • 34
  • 38
37
votes
3 answers

dict_items object has no attribute 'sort'

First of all I am new to Python. I am using PTVS http://pytools.codeplex.com/. Next I installed reportlab. Then I run a sample demo at https://github.com/nakagami/reportlab/blob/master/demos/colors/colortest.py#L68 But at line, all_colors =…
Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322
23
votes
3 answers

How can I add an existing folder structure to my visual studio project (python tools)?

This question is essentially the same as these: How do I add an existing directory tree to a project in Visual Studio? How to "Add Existing Item" an entire directory structure in Visual Studio? Except the solutions don't work for me. It looks like…
Miebster
  • 2,365
  • 4
  • 21
  • 27
16
votes
8 answers

Shortcut to comment out multiple lines with Python Tools for Visual Studio

What is the shortcut to comment out multiple lines with Python Tools for Visual Studio?
Johan Råde
  • 20,480
  • 21
  • 73
  • 110
13
votes
2 answers

Intellisense in python tools for visual studio

Sorry if this seems like a noob question but I have never used visual studio. I am trying to use PTVS and while it works great in general, I can't get Intellisense to work for imports from the local directory. When I import a local module I…
mpardalos
  • 171
  • 1
  • 1
  • 4
12
votes
2 answers

How do I suppress the console window when debugging python code in Python Tools for Visual Studio (PTVS)?

In PTVS the default behavior is for the program to print to the Python console window and the Visual Studio Debug Output window. Realizing that it won't be able to accept user input, how do I suppress the Python console window?
GollyJer
  • 23,857
  • 16
  • 106
  • 174
11
votes
4 answers

Plotting with Matplotlib in Visual Studio using Python Tools for Visual Studio

I am new to using PTVS for my Python code. I previously used Spyder as it came along with the Anaconda distribution. Here is the issue I am having. I am trying to create two plots, and show them in separate windows at the same time. A simple…
kdemirtas
  • 111
  • 1
  • 1
  • 4
10
votes
1 answer

Edit-and-continue while debugging under Python Visual Studio?

I often find when debugging that I have a small mistake in my code i.e. misspelling of a variable. It is very time consuming to have to then start the program again from the beginning. Is it possible to correct this mistake and then have the program…
rwolst
  • 12,904
  • 16
  • 54
  • 75
9
votes
1 answer

How can I install Python tool for visual studio 2015?

I was trying to install python tool for visual studio 2015, well it should have been an easy task just go on new project and choose python and visual studio would have downloaded it for you, but there some error coming or what is it i don't…
Prateek
  • 185
  • 1
  • 3
  • 12
8
votes
3 answers

Console windows closes right after I hit ctrl+F5 in visual studio tools for python

I have installed Python Tools for Visual Studio and I cannot see the output in the console window like I see output when I run a C# console application within visual studio upon hitting the following Shortcut keys. F5 -- Starts debugging the…
Mitul
  • 9,734
  • 4
  • 43
  • 60
8
votes
1 answer

Add CNTK virtualenv to Visual Studio Python project

I followed Setup CNTK on Windows, and confirmed that I can run CTNK from my local command prompt. C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py34>.\Scripts\activate.bat (root) C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py34>set…
Naoto Usuyama
  • 845
  • 1
  • 7
  • 13
8
votes
3 answers

PTVS: How to reference or use Python source code in one project from a second project

In Visual Studio with PTVS I have two separate Python projects, one contains a Python source file named lib.py for use as a library of functions and the other is a main that uses the functions in the library. I am using an import statement in the…
Guy Coder
  • 24,501
  • 8
  • 71
  • 136
8
votes
2 answers

Multithreaded python application not hitting breakpoints in Visual Studio

I am currently developing a PyQt application in Visual Studio. Debugging has been working great, until I decided to keep my UI responsive by moving stuff to a worker thread with Qt Threads. class MainWindow(base, form): start_work =…
kiki
  • 325
  • 6
  • 20
7
votes
1 answer

Intellisense not recognising type hinting for python 3

I would like to use Visual Studio and see intellisense using type hints, for example in the function argument list, to workout the type of a variable. This can be achieved through isinstance(param,type) statements, but I wonder if we can get it to…
Robino
  • 4,530
  • 3
  • 37
  • 40
7
votes
3 answers

Debug with internal command window Python Tools and Vistual Studio 2013

I just installed Python Tools with Visual Studio 2013 (Shell) and whenever I run a debug of the program, a separate window pops up for the interpreter: I can however run the program using the internal interactive console: However this doesn't seem…
James Mertz
  • 8,459
  • 11
  • 60
  • 87
1
2 3
14 15