
A Lap Around Python in Visual Studio 2017 - LyalinDotCom
https://blogs.msdn.microsoft.com/visualstudio/2017/05/12/a-lap-around-python-in-visual-studio-2017/
======
satysin
Who would have thought 5 years ago that today some of the best tools for
Python development would be developed by Microsoft as part of Visual Studio?

~~~
Loic
This is great, this will help getting support of a Python "stack" for
enterprise projects. At the moment I am mostly doing them in C#/VB.net and
always need to discuss a lot to get Python acceptance when scientific workload
is required (it is easier to say Fortran + C#/VB.net than Python!).

Now, I will be able to add: " _Microsoft is fully supporting Python_ " and
this will basically close the deal. I am happy.

~~~
smortaz
/team lead here/

Thanks!

Regarding "Scientific" \- we just added the Data Science Workload to Visual
Studio 2017. Check it out here:

[https://blogs.msdn.microsoft.com/visualstudio/2017/05/10/bui...](https://blogs.msdn.microsoft.com/visualstudio/2017/05/10/build-
intelligent-apps-faster-with-visual-studio/)

Basically Python + Anaconda, R + Microsoft enhanced R, F# with .Net as a
single install. Python & R work with any interpreter, including IronPython &
Pypy.

~~~
Loic
Thanks a lot! This is exactly what I need, this will ease my arguments when I
need to port/bring some "Matlab" code/models into a GUI tremendously.

Now, /me is dreaming of a cross-platform WPF with Python as language and
integrated in the IDE like C#/VB.net. I am using PyQT but this is not the best
on Windows.

On a side note, just comparing Visual Studio today and Visual Studio of my
first real work days in VC++/MFC (something like 20 years ago), I must say
that it really makes me ship good software faster and better. Thank you!

------
bauerd
And on the other side of the fence there's XCode, unable to refactor Swift …

~~~
WaxProlix
Just talking to some swift/iOS devs that I've done some projects with the
other day, and their workflow basically uses the JetBrains IDE and Xcode
simultaneously - one for code and the other because the JetBrains offering
apparently doesn't support storyboards (yet?). Coming from a backend
perspective, it sounds pretty atrocious.

------
teemwerk
Wow, that looks like a lot of really cool stuff. Might have to get back in a
python kind of mood, this really looks impressive, especially the c++
extensions.

------
nrjames
I do a lot of Python work and like most of the other "heavy" IDEs, this
doesn't appeal to me at all. The more layers of stuff you wrap around what
you're trying to do, the harder it is, in my experience, to make it easy to
deploy and maintain. I guess I'm turning into a graybeard.

~~~
alkonaut
I can see how the value of an IDE is much smaller in a dynamic language than a
statically typed one. In the statically typed language compiler output, test
output source symbols etc are links to other things in the project. That's
hard to accomplish in an editor + shell setup (or requires a huge config
effort that effectively makes the editor an IDE). I would use vscode or
similar if I did JS or Python, but for C# or Java you'd have to pry the IDE
from my cold dead hands :)

~~~
int_19h
Even with a dynamically typed language, the IDE can do type inference to
provide a lot of useful stuff, like go to definition of a symbol, or
refactoring.

~~~
lou1306
And when the IDE exploits Python 3 type annotation, the "static vs. dynamic"
gap is much less painful.

------
burntwater
The reasons to stick with macs are getting fewer and fewer by the day...

~~~
dep_b
Why did you ever need a Mac for Python and what's so different now? macOS
comes with Python built-in but in terms of IDE's there's PyCharm for macOS and
PyCharm for Windows and they're both just as effective. You just install them.
Code.

~~~
burntwater
Python specifically, no particular reason. As a cohesive environment,
Microsoft is chipping away at every reason I've had to stick with Macs and
their limited selection of hardware. Learning that a new Mac Pro is at least a
year away has me looking MUCH closer at Windows. And bit by bit, Microsoft is
crossing out all the reasons I had in my mental "No Microsoft" column.

~~~
dep_b
Since I'm a Cocoa developer and I don't like change for the sake of change I'm
just using Parallels for Visual Studio and Windows software development and
macOS for my main OS. I don't particularly dislike Windows but it's still a
bit messy.

However under the hood Windows is catching up if not overtaking macOS since
Windows Vista. I'm probably one of the few people that thought it was an
amazing improvement over Windows XP at the time (using it on a machine with
rock solid driver support perhaps helped). The graphics subsystem, security,
driver model: everything was better.

I just want Windows to be incrementally improved and homogenized for a long
while instead of half assed system wide changes every other release. The real
beauty of macOS in my opinion is that somebody coming from the betas on a BW
G3 in 1999 would still find his or her way easily on a 2017 Mac. But when they
changed it from OS 9 to OS X they did it drastically and with a pretty clean
cut from the past.

------
dom0
(Entirely unrelated to the actual contents)

I find it remarkable how visually inconsistent _all_ of the shown screenshots
are. (Look at all the small details that differ between each screenshot, like
margins around buttons, button sizing, size of text entry fields, chevron
styles and so on and so forth)

Windows (in this millennium, anyway) was never a really visually consistent
OS, because it pretty much always had some leftover crud GUIs, and even today
some dialogues from the early 90s exist nearly unchanged, though.

~~~
electricEmu
I use Visual Studio for work. I'm not seeing all the inconsistencies. The only
component I loathe is the git integration.

------
cwisecarver
What ever happened to IronPython running on the CLR?

~~~
zerkten
It was divested for a number of reasons. First, there was (and still is) the
Python 2 to 3 transition. Supporting Python 3 added a lot of overhead while
full Python 2 support was not available yet.

It also turns out that a lot of popular Python libraries have dependencies on
C/C++ code, so there were attempts like IronClad to provide support for these,
but it wasn't as easy as CPython. There were benefits like the CLR being able
to handle some workloads better than CPython with its GIL, but there are
expectations in some libraries that it's CPython running the code.

Startup performance also takes a hit due to jitting, so IronPython had to
implement some tricks to make it run scripts fast on the first run. This is a
pretty common case.

Then you add in compatibility and testing with frameworks like Django, and
balancing that against further development of the core. Even if you support
these frameworks, you may not be able to support some of the libraries and
tools that these developers coming from the open source world use, so their
experience can be soured and the project appears to be more of a science
project. That said, IronPython can excel in niches, such as adding
scriptability to your .NET app. But that's not going to take over the world.

These problems also applied to IronRuby. Both of them seemed to be joined at
the hip in terms of management, so I think that internal dealings at Microsoft
were part of the downfall. I have no idea what happened, but in the bigger
picture at that time, Microsoft was finally learning to do things a better way
with ASP.NET MVC. For their constituents that may have been a better
investment.

~~~
RussianCow
Plus, now you have Python for .NET[0] and similar projects that allow you to
seamlessly integrate CPython into your .NET program. This gives you the best
of both worlds and negates a lot of the value of a dedicated .NET Python
implementation.

[0]:
[https://github.com/pythonnet/pythonnet](https://github.com/pythonnet/pythonnet)

~~~
denfromufa
You can also use .NET assemblies from CPython using pythonnet, so it is
bidirectional interop bridge!

------
devopsproject
Damn, they are killing it.

------
jjmanton
I was really hoping Visual Studio 2017 for Mac would support this, but it
looks like it doesnt have full extension support yet.

~~~
smortaz
/team lead/

Unfortunately VS for Mac currently doesn't support Python or R (the two
languages our team supports). However, if you are interested, please file the
request on uservocie - that really helps us convince mgmt.

Meanwhile, VS Code has pretty decent Python support which can be used on
Windows, MacOS and Linux:

VS Code:
[https://code.visualstudio.com/docs/languages/python](https://code.visualstudio.com/docs/languages/python)

uservoice: [https://visualstudio.uservoice.com/forums/121579-visual-
stud...](https://visualstudio.uservoice.com/forums/121579-visual-studio-ide)

------
namingwaysway
I really liked the VS IDE when I was a windows programmer, I'm still
struggling to find something comparable.

My fears are still that python code on windows is still a nightmare,
especially when you throw something like OpenCV into the mix.

~~~
smortaz
/team lead/

Your fears regarding Python on Windows were quite justified. However, the
world has dramatically changed, thanks in large part to folks like
Continuum.io and their Anaconda distribution, Christoph Golke, and many other
wheel providers.

Visual Studio actually provides an option to download Anaconda for you. It has
a few hundred pre-built Windows pkgs ready to go. We also use it on our free
jupyter notebook service and have been very happy with it.

UCI repo:
[http://www.lfd.uci.edu/~gohlke/pythonlibs/](http://www.lfd.uci.edu/~gohlke/pythonlibs/)

Anaconda:
[https://www.continuum.io/downloads](https://www.continuum.io/downloads)

Azure Notebooks: [https://notebooks.azure.com](https://notebooks.azure.com)

~~~
chupapuma
/Dev on Team/ Also many packages, NumPy for instance, have improved their
builds for Windows. This is a combination effort of better support on the
platform side to make things better but also from package maintainers to
support Windows users better.

If you have been away from Windows for a bit, I think now is a good time to at
least take a cursory look around again ;)

------
mkane848
Has anyone used this for Django development? I currently use SublimeText 3 for
just about everything but I'm always open to new ideas.

~~~
chupapuma
/Dev on Team/ I have used it with Django, but most of my Django apps are mere
toys compared to things that other people are working on. This probably isn't
that useful of a video, but this was a talk at PyData using PTVS + Django to
demo some Azure Services
[https://www.youtube.com/watch?v=PElcaj1iylA](https://www.youtube.com/watch?v=PElcaj1iylA)

------
imcoconut
This looks awesome.

Does anyone have any opinions on how this compares to pycharm for similar IDE
functionality and jupyter support?

------
dafrankenstein2
my first experience was with python tools for visual studio 2012. i still use
vs2012. its a charm.

