Live data from Hacker News

Python Tools for Visual Studio

hanselman.com

71–80 of 134 posts

Re: Python Tools for Visual Studio

#71
post #25

Do people run django production sites on Windows? Not trolling, genuinely interested.

How is that relevant? One of the nice features of a language like Python is that it's very easy to write cross-platform code with it. You really have to do effort to code a python web app on Windows that breaks on Linux. The same holds for e.g. Ruby, Node.js and Java.

I prefer Windows for a dev platform (really, I do), but I've only once written a webapp that was hosted on Windows. I'd much rather prefer unixy servers.

Re: Python Tools for Visual Studio

#72
post #38

Another Microsoft's best kept secrets is using Javascript for shell script. It has been there forever since Javascript first came out. It's called JScript but it's just Javascript with Windows support like running ActiveX Objects, which let you access the file system, OS, network, etc. You can pretty much drive the Windows system with it through ActiveX Automation. Also you can do Office application integration like…

And more: you can create new ActiveX Objects from within that JScript script giving you access to just about anything. This has been there forever (I started using this in 2006) and I use it to let my users insert their code into the process of my desktop application.

Re: Python Tools for Visual Studio

#73
post #38

Another Microsoft's best kept secrets is using Javascript for shell script. It has been there forever since Javascript first came out. It's called JScript but it's just Javascript with Windows support like running ActiveX Objects, which let you access the file system, OS, network, etc. You can pretty much drive the Windows system with it through ActiveX Automation. Also you can do Office application integration like…

For me it's Web Essentials 2012. Create and compile LESS files among other great things

http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-...

Re: Python Tools for Visual Studio

#74
post #47

Earlier quoted context omitted.

I currently maintain and run a big ol' Django project running on Apache/Windows/MSSQL (and some Oracle) here (university of Arizona). It's not that bad although myself and the other developer both use mac's so its annoying having to RDP in to do anything in a python shell.

Have you tried powershell remoting ? It's close.

Unless I'm mistaken, this isn't possible in OSX is it?

Re: Python Tools for Visual Studio

#75

This doesn't even mention the most awesome feature of PTVS 2.0: mixed-mode debugging, which provides an integrated experience for debugging mixed Python/C processes. See https://pytools.codeplex.com/wikipage?title=Mixed-mode%20deb... for details. Disclaimer: I used to work on IronPython.

Microsoft really does make the most outstanding developer tools. I admit that I occasionally miss that deeply integrated, seamless feeling.

You guys deserve some recognition. I'm not too frequent a user lately, but I'm continually impressed.

Re: Python Tools for Visual Studio

#76
post #64

This doesn't even mention the most awesome feature of PTVS 2.0: mixed-mode debugging, which provides an integrated experience for debugging mixed Python/C processes. See https://pytools.codeplex.com/wikipage?title=Mixed-mode%20deb... for details. Disclaimer: I used to work on IronPython.

Can you expand a bit on how that works in principle ? Can you make it work with a standard python or did you need to insert probes' into the python interpreter to catch when it goes form C to Python and vice et versa

Some more specifics:

Stack walking works by rewriting the native stack. Basically we just let the native stack walker do its job, then strip out all python##.dll frames except for PyEval_EvalFrameEx. For that one we read the "f" argument and then parse the PyFrameObject to which it points, and replace the frame with our own using data from that frame object.

We parse the data structures ourselves, but use symbols to do so, which is why it'll work on any CPython build with symbols. This is why you can inspect objects even when process is stopped somewhere in native code, and it's impossible to eval using the interpreter.

We still use sys.settrace for breakpoints and Python stepping. Python-to-native stepping works by setting native breakpoints on code paths inside Python interpreter that can potentially invoke some user code (e.g. type_call invokes tp_init, which may point to a user function). When those breakpoints are hit, we eval the function pointer and see if it's outside of python##.dll, and if so, then set another breakpoint there. When it's hit, your step is complete.

So no, there are no special hooks added to the interpreter. We do end up relying quite a bit on internal implementation details, since we need to do things such as set breakpoints inside static functions, and read their arguments. However, because we use symbols for that, this works on any CPython build, including debug ones, and even customized ones so long as you don't rename anything that we rely on. E.g. adding a new field to PyObject is kosher, but renaming ob_type to something else would break us.

Re: Python Tools for Visual Studio

#77
post #51
post #43

Earlier quoted context omitted.

MSFT porting VS to Mac and Linux would give developers even more options.

...which would be detrimental to Microsoft. Limiting our options to theirs is precisely their goal by giving us a great IDE that only works on Windows. They're never gonna go it. They stand to win nothing from that.

Yeah, just like Office for Mac, they'd never do that.

/sarcasm

Re: Python Tools for Visual Studio

#78
post #54

Earlier quoted context omitted.

What languages do you work with? Simple things like being able to jump to the definition of a function with a press of a button (esp. when working with a large unfamiliar code base) are indispensable for me.

grep is nice. its gnarly in template heavy c++, but so are all the tools. intellisense can't reliably provide navigation among all of the possible instantiations in your project. (esc;qgrep -rn thing .) is faster for me than reaching for the mouse.

>> its gnarly in template heavy c++, but so are all the tools. intellisense can't reliably provide navigation among all of the possible instantiations in your project.

Have you tried it in VS 2010+? You might be surprised. I've seen it correctly handle polymorphic Boost lambdas, and that's a rather impressive feat of TMP. Also, I've just tried the scenario that you've described (if I understand it correctly - "Find all references" on a class template), and it does list all the explicit instantiations in the project.

Re: Python Tools for Visual Studio

#79

There are a lot of Python IDEs out there, some very good, such as IntelliJ IDEA. I'd prefer to see an objective comparison.

It's Scott Hanselman's blog. The entire point of it is to proselytize for MS products.

Not really, the blog is my side gig. I talk about lots of stuff, but since I'm in the MS dev space I lean in that direction. I work in Azure and ASP.NET as a PM, I'm not in marketing.

Re: Python Tools for Visual Studio

#80
post #38

Another Microsoft's best kept secrets is using Javascript for shell script. It has been there forever since Javascript first came out. It's called JScript but it's just Javascript with Windows support like running ActiveX Objects, which let you access the file system, OS, network, etc. You can pretty much drive the Windows system with it through ActiveX Automation. Also you can do Office application integration like…

Related, but for the same reasons, you could also write classic ASP using JavaScript (as opposed to VBScript). Years ago, I spent months trying to convince my team to let me use JavaScript instead of VBScript in our ASP files.
Post reply on HN