python.net

Cannot populate a WPF DataGrid using Python

南楼画角 提交于 2021-02-19 12:52:54
问题 I have a problem binding data to a WPF DataGrid using Python.NET The code is shown below, and I've tried three different approaches to binding data - each fails and the error message is included as a comment in the code below If I do not attempt to add data, the datagarid displays correctly with headers. But I'm unable to populate the grid with any data. Any help will be gratefully received!!! Doug import clr #.NET references import System import System.Windows.Controls as WPFControls import

Cannot populate a WPF DataGrid using Python

99封情书 提交于 2021-02-19 12:50:54
问题 I have a problem binding data to a WPF DataGrid using Python.NET The code is shown below, and I've tried three different approaches to binding data - each fails and the error message is included as a comment in the code below If I do not attempt to add data, the datagarid displays correctly with headers. But I'm unable to populate the grid with any data. Any help will be gratefully received!!! Doug import clr #.NET references import System import System.Windows.Controls as WPFControls import

Cannot populate a WPF DataGrid using Python

我只是一个虾纸丫 提交于 2021-02-19 12:50:53
问题 I have a problem binding data to a WPF DataGrid using Python.NET The code is shown below, and I've tried three different approaches to binding data - each fails and the error message is included as a comment in the code below If I do not attempt to add data, the datagarid displays correctly with headers. But I'm unable to populate the grid with any data. Any help will be gratefully received!!! Doug import clr #.NET references import System import System.Windows.Controls as WPFControls import

How to put an Enum into a List, using PythonNET and C#.NET?

前提是你 提交于 2021-02-08 02:35:23
问题 I have a NET library I'm using from Python with PythonNET and can't figure out how to put an enum into a List. It seems Python converts the enum to an integer that won't fit the List datatype. Here's an example: import clr from System.Collections.Generic import List from System import Array, Enum import MyLibrary enum = List[MyLibrary.ResultType] #no errors here enum.Add(MyLibrary.ResultType.PV) #TypeError: No method matches given arguments #and just typing MyLibrary.ResultType.PV I get this

IronPython unable to run script that imports numpy

家住魔仙堡 提交于 2021-02-07 09:36:28
问题 Disclaimer - I'm not familiar with Python. I'm a C# developer who has written an application to execute Python scripts (authored by others) using IronPython. These scripts have so far have only needed to use import math , but one of our users has asked for the application to support for Numpy. I have installed Numpy on my PC (using the 'numpy-1.9.2-win32-superpack-python2.7.exe' file), which has created a numpy folder under \Lib\site-packages. I've written a two-line Python script to test

IronPython unable to run script that imports numpy

♀尐吖头ヾ 提交于 2021-02-07 09:36:27
问题 Disclaimer - I'm not familiar with Python. I'm a C# developer who has written an application to execute Python scripts (authored by others) using IronPython. These scripts have so far have only needed to use import math , but one of our users has asked for the application to support for Numpy. I have installed Numpy on my PC (using the 'numpy-1.9.2-win32-superpack-python2.7.exe' file), which has created a numpy folder under \Lib\site-packages. I've written a two-line Python script to test

Python tkinter.filedialog askfolder interfering with clr

余生长醉 提交于 2021-02-07 07:01:22
问题 I'm mainly working in Spyder, building scripts that required a pop-up folder or file Browse window. The code below works perfect in spyder. In Pycharm, the askopenfilename working well, while askdirectory do nothing (stuck). But, if running in debug mode - the script works well. I tried to run the script from SAS jsl - same issue. Any Idea what should I do? Python 3.6 Pycharm 2017.2 Thanks. The Code I'm using includes: import clr #pythonnet 2.3.0 import os import tkinter as tk from tkinter

Python tkinter.filedialog askfolder interfering with clr

▼魔方 西西 提交于 2021-02-07 07:01:08
问题 I'm mainly working in Spyder, building scripts that required a pop-up folder or file Browse window. The code below works perfect in spyder. In Pycharm, the askopenfilename working well, while askdirectory do nothing (stuck). But, if running in debug mode - the script works well. I tried to run the script from SAS jsl - same issue. Any Idea what should I do? Python 3.6 Pycharm 2017.2 Thanks. The Code I'm using includes: import clr #pythonnet 2.3.0 import os import tkinter as tk from tkinter

Calling C# code within Python3.6

北慕城南 提交于 2021-01-21 04:49:44
问题 with absolutely no knowledge of coding in C#, I wish to call a C# function within my python code. I know there's quite a lot of Q&As around the same problem, but for some strange reason, i'm unable to import a simple c# class library from a sample python module. Here's below as to what i've done - C# Class Library setup I'm using the VS 2017 CE. I create a new project TestClassLibrary under the type of ClassLibrary(.NET Standard) The classes inside the project are as follows - MyClass.cs

How to install packages/modules in IronPython

爱⌒轻易说出口 提交于 2020-12-29 03:03:09
问题 I am new to IronPython. Thanks for you help and patience. I installed IronPython 2.7 from http://ironpython.net/ in Visual Studio 2015. I also installed Python 2.7.6 and anaconda. I tried the following solution and it didn't work. Installing Python Packages - IronPython I am wondering can IronPython use the modules installed by anaconda directly? The packages I tried to install are numpy,scipy,pandas,sklearn. I saw a document in 2012 pointed out that sklearn is not supported in IronPython. Is