For an application I need te pyvisa package. I've installed it in the site-packages folder of my C:Program Files\Ironpyton 2.7\Lib folder (I am new to python, so I don't know if this is the correct way to do this).
I created a simple Windows Forms project doing nothing but import the pyvisa package. So my MainForm.py looks like this:
###
import System.Drawing
import System.Windows.Forms
from visa import *
from System.Drawing import *
from System.Windows.Forms import *
class MainForm(Form):
def __init__(self):
self.InitializeComponent()
def InitializeComponent(self):
#
# MainForm
#
self.Name = "MainForm"
self.Text = "test"
###
I can run the application using Project->Run Project. I can also run it using Python->Run (which refers to the ipy.exe in the Ironpython 2.7 folder). But when I execute the compiled.exe file, I get the following error in the cmd-box:
###
Unhandled Exception: System.ArgumentException: URI formats are not supported.
at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[ arg
s, Boolean& shouldOptimize)
at IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`6.Call5(Cal
lSite site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, T3 a
rg3, T4 arg4)
at System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet
](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName, P
ythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.InitializeModule(Assembly precompi
led, String main, String[ references)
at PythonMain.Main()
###
Does anyone have clue what this is about. I'm not using any http-links or such. And it is working fine with ipy.exe.
I'm using SharpDevelop 4.0.0 and IP 2.7.