e information.
>>> import System
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named System
>>> import clr
>>> import System
>>> System
>>>
NB: You should have copied the clr.pyd and Pytho
if you've seen this but in the spirit of posting patches I thought
I'd mention Alexey Borzenkov's patch:
http://git.kitsu.ru/patched/pythonnet.git?a=commitdiff;h=995109e3ed27d6061dde5376f2968c9fbad894b7
Which fixes the problem of errors in constructors not being passed through to
Python
NET4 version:
%windir%\Microsoft.NET\Framework\v4.0.30319\ilasm /nologo /quiet /dll
%ILASM_EXTRA_ARGS% /include=%INCLUDE_PATH% /output=%OUTPUT_PATH% %INPUT_PATH%
...and everything works perfectly!
HTH,
Dave
NB: Apologies if this appears twice - I sent it from a different account
previously and d
t the breakpoint you set in the function called by the
Python script.
HTH,
Dave
--
View this message in context:
http://old.nabble.com/Problem-debugging-to-python.runtime.dll-tp27644956p27645311.html
Sent from the Python - pythondotnet mailing list archive at Nabble.com.
___
h? e.g.
clr.AddReference(r'C:\temp\PythonDotNET\FactoryPattern')
If that doesn't work does using Assembly.LoadFile work? e.g.
from clr import System
from System import Reflection
full_filename = r'C:\temp\PythonDotNET\FactoryPattern.dll'
Reflection.Assembly.LoadFile(full_filename)
HTH,
Dave
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
s in it?
>
I managed to compile Python.NET for .NET 4 with only a couple of minor
modifications to the code:
http://thread.gmane.org/gmane.comp.python.dotnet/969
NB: I put both clr.pyd and Python.Runtime.dll in my python root dir
(C:\Python26)
HTH,
Dave
0.10.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
IPython p
.NET4 version of ilasm - see:
http://permalink.gmane.org/gmane.comp.python.dotnet/970
I don't know that copying over the newly compiled python.exe will work (possibly
for the reasons you state) however simply copying over the clr.pyd and
Python.Runtime.dll to your C:\Python26 directory should work
#x27;ll see
under "Conditional compilation symbols" PYTHON25,UCS2 or similar. To target
Python 2.7 simply change that to PYTHON27,UCS2
HTH,
Dave
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
style
byte string would allow numpy.fromstring() to be used for creating the
numpy array.
(I see a similar question went unanswered on the list in August 2011, but I
was hoping someone may have figured it out by now.)
Thanks,
Dave Cook
_
Python.NET
_hndl = GCHandle.Alloc(src, GCHandleType.Pinned)
try:
src_ptr = src_hndl.AddrOfPinnedObject().ToInt32()
bufType = ctypes.c_double*len(src)
cbuf = bufType.from_address(src_ptr)
dest = np.frombuffer(cbuf, dtype=cbuf._type_)
finally:
if src_hndl.IsAllocated: src_hndl.Free()
Dave
l.Copy:
def ndarray_ptr(a):'''Return a .NET pointer to the underlying
ndarray data.'''return
IntPtr.__overloads__[int](a.__array_interface__['data'][0])def
marshal_to_ndarray(src):n = len(src)dest = np.empty(n,
dtype='f8')
Marsha
It doesn't look like it's supported to instantiate a C# class from Python
using keyword arguments? Is that the case or am I missing something.
If it's not supported would it theoretically be possible and if so how
difficult would it be to implement?
Denis Akhiyarov writes:
>
>
> Hi Dave,
> Can you please file an issue on github? I think keyword args is
important functionality since the call signature is not visible from
Python to c# and vice versa unlike IronPython. Does this work on
IronPython?
> github.com/pythonnet
&
It seems that there's no way to pass an infinity from Python to C#? Is
that correct, or am I missing something?
In case the former is correct I've filed an enhancement request issue on
github:
https://github.com/pythonnet/pythonnet/issues/100
Th
15 matches
Mail list logo