Questions tagged [python.net]

Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and Mono. Pythonnet provides a powerful application scripting tool for .NET developers. Using this package you can script .NET applications or build entire applications in Python, using .NET services and components written in any language that targets the CLR (C#, VB.NET, F#, C++/CLI) and CPython.

Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and Mono. Pythonnet provides a powerful application scripting tool for .NET developers. Using this package you can script .NET applications or build entire applications in Python, using .NET services and components written in any language that targets the CLR (C#, VB.NET, F#, C++/CLI) and CPython.

https://pythonnet.github.io/

578 questions
0
votes
0 answers

Can python functions be called on different button clicks?

I wish to call function1 from a python class in winform.button1_click_event() and then function2 from the same python class in winform.button2_click_event(). Note: function2 depends on function1 for data. How can this be done ? I cannot use…
user2587
  • 149
  • 10
0
votes
1 answer

how to use breakpoint in mydll.dll using python3 and pythonnet

I have function imported from a DLL file using pythonnet: I need to trace my function(in a C# DLL) with Python.
0
votes
1 answer

Using NLTK in C# with pythonnet: Generator object is empty

I'm trying to execute some Python code in C# using Pythonnet. In particular, I'm trying to run some basic NLP operations using the NLTK library, such as get the hyponyms of a given WordNet synset. No matter what I do, the returned generator object…
0
votes
1 answer

Unable to install pythonnet

I'm trying to install pythonnet in order to use clr module. But it doesn't work ... Here is my command "Conda install -c pythonnet pythonnet" and here as the results : enter image description here enter image description here I tried several time…
Jess
  • 103
  • 6
0
votes
1 answer

Retrieve frame from cv2.VideoCapture in C# variable type

I'm trying to get frames from a IP camera using cv2.VideoCapture function of Python OpenCV. I'm using PythonNet to retrieve this frames to a C# Console Application. But I can't retrieve the boolean and the image that return cv2.VideoCapture in C#…
0
votes
1 answer

Executing Python Code in C# WebAPI WebService Project

I am working on ASP.NET WebAPI Web Services and one of my requirement is to call a python script that outputs a JSON object and send it as web service response. I have Installed IronPython 2.7.9 nuget package and my computer has Python 3.6 I addded…
user7050297
  • 117
  • 1
  • 1
  • 11
0
votes
0 answers

How to fix pip install error for all modules?

I have been trying to install beeware all day, but I keep getting the error failed with error code 1 in C:\Users\dmcga\AppData\Local\Temp\pip-install- snn9ad__\pythonnet\ Seeing that this error had something to do with pythonnet, I tried…
Demons
  • 179
  • 2
  • 14
0
votes
0 answers

Loading a 32bit C# dll in 64bit python.NET

I am trying to make a 32bit C# dll interface with Python through Python.NET. However, I want to use certain python libraries that are only available in 64bit version, forcing me to use 64bit python. Is it possible to interface with a 32bit C# dll…
user44136
  • 25
  • 4
0
votes
1 answer

Constructor of custom form with pythonnet

I have a problem with the custom constructor of a form(created in C#) which extend XtraForm from DevExpress.v17.1 library. It has two constructors: protected BaseForm() { InitializeComponent(); } and protected BaseForm(IClient client) { …
0
votes
1 answer

Worker Thread Stops execution when it reaches at Using Block C# Windows form application

This is how the demo windows form app looks like: And this is the implemented code: public partial class HornMorphoWindow : Form { private static dynamic _morpho; private static string _analyzeWord; private static Logger logger =…
ash
  • 2,902
  • 3
  • 19
  • 34
0
votes
0 answers

How to control form from script in .net scripting

I am using pythonnet for scripting winforms. class IForm(Form): def __init__(self): self.excel_file = None self.Text = 'Demo' self.Size = Size(250, 200) self.Icon = Icon(icon) self.label = Label() …
Rahul
  • 10,830
  • 4
  • 53
  • 88
0
votes
1 answer

How can I import .pyd module in IronPython?

I have seen some Q&A about this problem. In most cases, it shows CPython Extensions for IronPython. But it is too old to download module files. The download link doesn't work, so I can't resolve the problem. What should I do for using .pyd in…
Morimi
  • 29
  • 2
0
votes
2 answers

Python and IronPython communication inquiry

Purpose of this program is to control two measurement instruments through GPIB using Python. Inst_A: controlled with CPython and PyVISA (Not yet available in IronPython). Inst_B: controlled through DLL library provided by manufacturer; IronPython…
paul
  • 21
  • 7
0
votes
1 answer

TFS CLI commands from python script

I am writing some python extension scripts to integrate TFS version control functionality to our tool. The process that we follow is something like this, 1, The TFS.exe cli commands are written to a batch file. 2, The batch file is executed using…
Joe Varghese
  • 59
  • 1
  • 9
-1
votes
1 answer

Integrate a Python model in C# console app

I'm a student and currently writing a telegram bot in c# and I've separately written a communication model in Python. But I have problems with integrating the model into the bot code. The best option is Python.NET because my model use pandas,…
Enemy
  • 1
  • 1
1 2 3
38
39