Can VS's IronPython Interactive window work with variables in .py file invoked from C# via CreateScriptSourceFromFile call?

可紊 提交于 2020-03-26 04:36:22
问题 There is a scenario where a C# process loads up and executes a .py file (code below) that is supported for debugging by PTVS in VS. private void button_Click(object sender, RoutedEventArgs e) { var engine = IronPython.Hosting.Python.CreateEngine(new Dictionary<string, object> { { "Debug", ScriptingRuntimeHelpers.True } }); var source = engine.CreateScriptSourceFromFile("..\\..\\"); dynamic result = source.Execute(); } This is described in Is there any way to debug Python code

Importing RPi.GPIO into a Python Project within Visual Studio

邮差的信 提交于 2020-01-03 05:15:42
问题 I just recently came across PTVS which provides a pretty killer environment for Python development. I was most excited when I found this because it seems that it could provide a clean and user friendly environment to develop and debug Raspberry Pi programs within Visual Studio . As stated by the developers, Python Tools already provides a number of facilities to debug apps launched from the IDE itself, as well as attaching to existing Python processes on both local and remote machines.

How to run commands from within Visual Studio PTVS?

牧云@^-^@ 提交于 2019-12-31 07:00:52
问题 I'm using Visual Studio 2012 and PTVS to play around with locustio and suds. I have setup an environment using virtualenv in Visual Studio and installed locustio, suds and all the associated dependencies. If I was to run locust via the command line in Mac or Linux I'd do something like: `locust -f' and locust would run and open a locally hosted page where I could control locust. Django has a similar setup where you type runserver from the command line and your django project

Visual Studio Python Environments window does not display

你离开我真会死。 提交于 2019-12-30 07:46:05
问题 I have installed Win10, Visual Studio 2015, Python 2.7, Python 3.5 and PTVS 2.2.3. Unfortunately PTVS does not work at all. I can not load any Python projects that were loading previously in Visual Studio. It worked before I installed Python 3.5. I tried to uninstall Python 2.7 and get an error saying that the uninstall didn't success. After several tries, the problem appears to be around pip which is somehow blocking both install and uninstall of Python 2.7. When trying to open Python Tools

Installing Python Packages - IronPython

半世苍凉 提交于 2019-12-30 04:51:04
问题 I'd like to add the PRAW package to an IronPython solution in VS however it's proving to be a pain in the butt. Here are steps I'm taking right-click on IronPython Environment, select install python package. type in "Praw" using pip I get a prompt telling me that pip needs to get installed. I then see the following: Installing 'pip' package manager. Downloading distribute from Installing from distribute-0.6.45 Before install bootstrap. Scanning

Is it possible to debug a method called from the interactive window in PTVS?

孤人 提交于 2019-12-24 11:44:58
问题 When I'm developing in Python I often want to debug a specific method, in which case it makes sense to call the method from the interactive console or debug interactive console. However, when a method is called from the interactive windows in PTVS, it doesn't stop at the break points in said method. If it's possible, please tell me how to do it. If not, I would like to request this feature, and also to know if there is any quicker way to debug a specific method than calling it from the main

How to debug a remote python application with (Python Tools for) Visual Studio?

霸气de小男生 提交于 2019-12-22 05:09:22
问题 According to, PTVS supports "Local and remote debugging". However, I couldn't find anything related to it or. So I'm curious if their "remote debugging" is simply attaching to a running process on the same machine or if there's some actual remote debugging support over TCP/IP available. I'd like to use PTVS for a WSGI-based web applications running on apache on another (linux) machine, but without a proper remote debugger (such as WinPDB, which is not that bad but

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

北慕城南 提交于 2019-12-21 11:26:23
问题 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 program and closes the console window in c# and in Python Ctrl+F5 -- Start without debugging, works as expected in C# but not in Python program . It always exits the console window under both the options. There is a third option " Execute Project in

Python in Visual Studio (PTVS): Debug not working but Run works

只愿长相守 提交于 2019-12-20 05:01:53
问题 I installed PTVS 2.1 on MS Visual Studio 2013 and then created a simple python project showing 'Hello World'. When I Start Without Debugging I see the shell and 'Hello World' message, everything is fine. But when I try Start Debug, nothing happens, no errors are reported, no shell comes up, no breakpoints get reached, nothing! Any suggestion? My platform and packages: Win 8.1 64bit VS 2013 Ultimate Python 2.7.9 64bit PTVS 2.1 64bit UPDATE : I just found that in Visual Studio 2010, this

Working with PTVS, IronPython and MongoDB

喜你入骨 提交于 2019-12-20 03:08:48
问题 I want to develop an applocation using the PTVS (Python Tools for Visual Studio) and i download the PTVS pluging and IronPython for Visual Studio 2012, it works perfectly. My question here is, Can i use MongoDB with PTVS and ItonPython? If i can, how can i do it? I already tried to install it by clicking on Install Python Package , but every time ask me to install pip and fails on install. Then of course the command pip install pymongo fails because pip is not installed. Here is the error: