Tagged Questions
0
votes
0answers
7 views
IronPython: ContextSwitchDeadlock occured
I am getting the following exception
>**ContextSwitchDeadlock occured**
>Managed Debugging Assistant 'ContextSwitchDeadlock' has detected a problem in 'C:\Program Files ...
0
votes
2answers
30 views
File path has special character \N
I am working on copying a file from one location to another. This is easy, using shutil.copy. Everything was fine until a special "source" came.
The path of the file is like this:
...
0
votes
0answers
25 views
embedding python in c# using pythonnet
Pythonnet has sparse documentation so have not been able to get an answer to a basic use of the library. So I want to frame what I want to achieve and ask folks whether this is possible and how.
I ...
1
vote
1answer
13 views
How to handle ref params when call c# function from ironpython
Recently, I use ironpython as my script engine in my c# projects, I use it to develop addins as described in book -"IronPython in Action". But when I call a c# function with ref param,I don't known ...
0
votes
0answers
8 views
IronPython: MessageQueue.Receive() exception on script
I am encountering the below exception on when accessing a private queue in MSMQ, using IronPython. The exception is unexpected because (1) When I send and receive messages using the IronPython ...
0
votes
0answers
6 views
Error in sending Message queues in MSMQ using IronPython
I will be using IronPython to send and receive message queues from MSMQ.
I practicing in the command line console of IronPython but cannot move forward because I am encountering this error, everytime ...
0
votes
0answers
16 views
Fidler || Programmatically configure rules || Using Fiddler's Auto Responder Feature Programmatically
I got this youtube reference for creating rules.
Now if I want to use this feature programmatically then how how to that meaning how one can use Fiddler's Auto Responder Feature Programmatically?
...
-1
votes
0answers
13 views
How to pass on variables between forms in Iron Python
I'm just starting out in Iron Python in VisualBasic Express 2013. I'm trying to pass back varibles between windows forms. For example if I wanted to get a value for var1 by calling another window and ...
1
vote
0answers
30 views
Installing PsychoPy as a third party package in Ironpython
I've been using IronPython to use functions in a C# .dll class library. I have also been using another set of packages called Psychopy. However, IronPython does not recognize Pyschopy packages. I ...
0
votes
0answers
35 views
python out of stack, how to allocate more?
I have a python script that does os.system('cscript blabla.js unittest'), it runs unit test. the tests runs from the commandline, but python gives me out of stack space (ironpython actually), is there ...
0
votes
0answers
15 views
How to use dll in Iron Python
Iron Python can't import Standard Library when make exe
so I tried this :
ipy pyc.py /main:os.py /out:StdLib /target:dll
and it work ! StdLib.dll was created and I tried this:
import clr
...
-1
votes
1answer
44 views
Running Python code in C#.Net using IronPython
I am trying to run a python code in c#.net using Iron Python.
The python code I am using consist of various import statements which import the different files from C:/Program Files/Python27 folder.
...
7
votes
1answer
105 views
IronPython throw InsufficientMemoryException when using numpy in threads
I have some IronPython code that being called from within a C# application.
This code worked fine until I decided to change one function to run in a thread.
when numpy functions called in a python ...
2
votes
1answer
52 views
Does IronPython just use Python or to use IronPython do I need to know other programming languages other than python?
I am planning on using IronPython to develop a GUI interface for some python code. Do I need to know any other programming languages other than python. Also if not are there any other GUI ...
0
votes
2answers
24 views
Iron Python get attributes of class instance, based on string input
This is my code, I'm new to python and can't understand why this wont work, I want to be able to print the class instances attributes after that particular instance has been selected by the user. I'm ...
0
votes
1answer
85 views
Capture python print statements in C#
I am writing a C# component which takes an ironpython function as a parameter.
def test():
x=x+1
print "Test"
C#:
var v = ...
0
votes
1answer
55 views
How to convert Iron Python dictionary to Python dictionary
I need to convert a received IronPython dictionary variable to a regular Python dictionary. From what I understand the variable is so-called:
...
0
votes
1answer
27 views
Ironpython shell colors
I would like to use terminal colors with IronPython. More specifically, I'm using Windows 7 PowerShell with IronPython 2.7.4 and I would like my logging message to print with different colors.
I was ...
1
vote
1answer
64 views
Compiling IronPython into an exe that uses standard library packages
In my IronPython script, I'm using standard libary modules like ConfigParser, logging and JSON.
Then I use pyc.py to create an executable. At first I ran into problems, namely '...ImportException: no ...
4
votes
0answers
67 views
run Python functions from vb.net
I am new with vb.net. I am trying to call python functions from vb.net but getting error that 'Invoke' is not a member of 'Microsoft.Scripting.Hosting.ObjectOperations'
Imports Microsoft.Scripting
...
0
votes
1answer
28 views
Python socket.close() does not work until the script exit
Client Codes:
fwd = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
fwd.connect((oriIp,oriPort)
fwd.close()
I found the close() function did not work.
My server (c#) shows the connection still ...
0
votes
1answer
63 views
Unable to import scipy but can import numpy in IronPython
I am trying to port my code from Python(v2.7) to IronPython so as to be able to leverage the multiple cores I have at my disposal on my lab computers.
I first installed IronPython from: ...
1
vote
0answers
71 views
Python: Create a multidimensional array from a loop
Please can you help, I am struggling how to create a multidimensional array from a loop.
I am looping through rows in a data table and want to pass these to an array.
Thanks
Jay
from ...
1
vote
1answer
34 views
Issue calling a python script from an iron python script (which is called from c# script engine)
I'm calling an iron python script from c# using
ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null);
ScriptRuntime runtime = new ScriptRuntime(setup);
ScriptEngine ...
1
vote
0answers
99 views
.net framework with scrapy python
Is it possible to use .NET framework with the Python scrapy framework to scrape data from different sites?
I am working on my final year project in which I want to use C# as front end language and ...
2
votes
0answers
49 views
IronPython TypeError exception has no traceback
In my code I am having a TypeError exception that is crashing my code. In this one particular program (I created a test file to reproduce the error and couldn't) the traceback only says TypeError: ...
0
votes
1answer
109 views
import error of matplotlib with IronPython
I am trying to use matplotlib within the Ironpython environment, using "import matplotlib.pyplot as plot".
However, I have seen this error for more than 3 hours, and could not figure out how to solve ...
1
vote
0answers
45 views
Numpy array custom dtype, array is not writable (IronPython)
I have a question to numpy arrays using in IronPython. I have a problem assigning values to array with custom dtype. I'm using example from http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html
...
1
vote
1answer
46 views
IronPython 2.7 with NetworkX 1.8.1
I am trying to use NetworkX 1.8.1 with Ironpython 2.7. Now I've been stuck to this problem for about 12 hours so far.... but without any luck. Whenever I tried to import networkX, I am having 'non ...
0
votes
0answers
66 views
Trying to run IronPython in C#: 'LightException' object has no attribute 'qstkutil'
I am trying to run this code in VS c#:
//calls script that will be executed as a new Thread
private void portfolioAnalysisToolStripMenuItem_Click(object sender, EventArgs e)
{
...
1
vote
1answer
72 views
save workbook with openpyxl in ironpython
I'm running into an issue saving an excel file using openpyxl using the IronPython runtime engine embedded in a .NET 4.0 application, however when running the same code within the IronPython ...
0
votes
1answer
59 views
How to create a Button from code in WPF and Python?
I need to build multiple buttons, but I can't display any button! this is my code of a WPF application with IronPython 2.7..
I've tried this in two different ways, with "Grid.Children.Add(button)" ...
0
votes
1answer
93 views
Is it possible to check the syntax of a python script before running it when making use of IronPython and C#?
Since I solved the issue of checking the syntax, I shall elaborate on how I did this. I will use my own implementation as an example.
First of all what have I used and how I have used it?
I made use ...
0
votes
0answers
140 views
How to show data on DataGrid from a list of objects in IronPython with WPF (Visual Studio 2013)
(I'm using IronPython 2.7 in Visual Studio with Python Tools for Visual Studio 2013 (PTVS). For this question I skipped a lot of code, but imagine that i have declared everything fine)
My problem is ...
0
votes
1answer
163 views
Integration of python in C# Application
I have the following problem:
I got an old application which is written in python. This application allows the user to specify small python steps which will be executed, python steps are basically ...
0
votes
0answers
38 views
IronPython use beautifulsoup 4 to grab html,functioning well in python IDLE but failing in IronPython
I have written a 'getInfo.py' to grab some information from the web using BeautifulSoup 4 to parse it out,its coding type is utf-8.
I'd like to call the function in getInfo.py in my ASP.NET MVC ...
0
votes
0answers
74 views
Python translation of MATLAB ASCII Image converter
I tried translating (unsuccessfully) the MATLAB program related to the Reddit post using the OMPC translator. I'm either not sure as to how to load and execute the generated Python code (below) in the ...
0
votes
2answers
75 views
Ways to launch python script from C#
I used the search engine. I couldn't find the thing I want,and i'm not that good in programming.I have a .py script that use hashlib and M2Crypto,and when i use iron python to run the program from c# ...
0
votes
1answer
44 views
Can I change the default typing of variables in Python?
Ideally I would like to be able to redirect assignment to my classes rather than the built in Python classes. For instance:
class MyInt(int):
def __add__(self, other):
#some type ...
1
vote
1answer
34 views
DynamicsGP eConnect: cannot connect to endpoint
I'm using IronPython to use eConnect's .NET API for integration of expense reports with GP.
When
result = conn.CreateTransactionEntity(connection_string, xml)
is executed, I get this error:
...
0
votes
1answer
88 views
Terminating an IronPython script
This may not specifically be an IronPython question, so a Python dev out there might be able to assist.
I want to run python scripts in my .Net desktop app using IronPython, and would like to give ...
0
votes
2answers
68 views
Iron python: How to append string to bytearray
I have a bytearray to which I have to add a number as a four character string. i.g. 14 should be added as '0014'.
I tried this:
id = 14
arr.append(bytearray(format(id, '04x')))
but it results ...
1
vote
1answer
73 views
TypeError: int() got an unexpected keyword argument 'base' error of pyPdf-1.15 in ironpython
I have installed pyPDF2 pyPdf-1.15 successfully installed when I open terminal and type these codes
import os
from PyPDF2 import PdfFileReader
path = "F:/Download"
inputFileName = os.path.join(path, ...
3
votes
1answer
57 views
Launch times of compiled Python vs IronPython
I'm currently writing some Windows GUI applications in Python 2.7 using pyQT4 and pyInstaller. These compiled executables are taking about 3-6 seconds to open. I've eliminated UPX already and seen ...
3
votes
1answer
86 views
Replace a .NET object instance with an IronPython object
I'm trying to do the following:
Get an instance of an object defined in C#
It implements a certain interface
It is a field on another C# class instance
Wrap it with an IronPython proxy object that ...
4
votes
2answers
330 views
IronPython Remote Debugging with PTVS
i've implemented IronPython in my C#-Application successful. I store all my scripts in a database and load them when they are needed. Now i want to debug my Python-Code with the PTVS. But always when ...
0
votes
1answer
140 views
Integrating Python in application which runs vb.net scripts
We have a tool written in C# where we write vb.net scripts. Now, I need to integrate python in it so that we can run python scripts in same tool. All, the tool does is send string command and capture ...
4
votes
2answers
85 views
Is it possible run python in .net application?
In .net application is possible save c# code in text file or database as string and run dynamically on the fly. This method is useful in many case such as business rule engine or user defined ...
1
vote
2answers
165 views
Working with PTVS, IronPython and MongoDB
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 ...
0
votes
0answers
98 views
How to import string with “\” (backslash) from Excel into C# using Excel DNA
To give some context, I have a spreadsheet that prices financial derivatives by running a Monte Carlo simulation on an arbitrary user input payoff function that is defined by a string (a Python lambda ...