Its been a while, but I think what you will need to do is create a GCHandle on
your buffer to pin it, then call GCHandle.AddrOfPinnedObject(buffer) and pass
the resulting IntPtr as the void * argument.
On 3/9/17, 11:33 AM, "PythonDotNet on behalf of Aloter One"
wrote:
>Hello,
>I'm trying t
Hi all - to clarify on Denis’ totally legit observation on the mailing list:
While I haven’t been able to be particularly active in python.net development
for a number of years, I have been the moderator of the mailman list this whole
time. We get a pretty huge amount of spam, which is why I’ve
Hi Adam - thanks for the note, and happy to see Python for .NET is useful
to you. I can't answer all of the questions, but can take a swing at a few:
- is there a BDFL … is Brian Lloyd still active; or is Tony Roberts
steering the ship (being the top code contributor recently on github?) It
,
>-
>
> http://stackoverflow.com/questions/13259617/python-for-net-unable-to-find-assembly-error
>- https://github.com/geographika/PythonDotNet
>
>
> and much more Unfortunately, it doesn't work and I get different
> errors. I know that exists IronPython
right now? Is there may be a
> way to whitelist certain senders, so that those emails go to the list right
> away? Seems like a lot of work for you, otherwise.
>
>
>
> Cheers,
>
> David
>
>
>
>
>
> *From:* Brian Lloyd [mailto:brian.d.ll...@gmail.com]
Python.NET mailing list - PythonDotNet@python.org
> https://mail.python.org/mailman/listinfo/pythondotnet
>
--
Brian Lloyd
brian.ll...@47lining.com
(c) 540.845.2975
_
Python.NET mailing list - PythonDotNet@python.org
https://mail.python.org/mailman/listinfo/pythondotnet
nterNum, out ushort count)
>
>
> Thanks,
>
> Kenny
>
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
>
--
Brian Lloyd
brian.d.ll...@gmail.com
(c) 540.84
_________
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
>
--
Brian Lloyd
brian.d.ll...@gmail.com
(c) 540.845.2975
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
of this DLL:
>
> http://files.maxim-ic.com/sia_bu/softdev/owdocs_400beta2/Docs/OW.NET/OW.NET_Primer.html
>
> Greetings
> Jorn
>
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pyt
**
>
> **
> PASSPORT CAPITAL
> 30 Hotaling Place, Suite 300
> San Francisco, CA 94111
> www.passportcapital.com
>
> *Scot Kelly
> *Tel 415-525-8910
> Fax 415-321-4620
> ske...@passportcapital.com
>
>
>
>
> CONFIDENTI
it has it's own .so as well. Time
>> for some testing
>>
>>
>>
>> cheers,
>> laszlo
>>
>> _____
>> Python.NET mailing list - PythonDotNet@python.org
>> http://mail.python.org/mailman/listinfo/pythondotnet
>>
e()
>
>at Python.Runtime.Runtime.Initialize()
>
>at Python.Runtime.PythonEngine.Initialize()
>
>at Python.Runtime.PythonConsole.Main(String[] args)
>
>
>
> Am I doing something wrong?
>
>
>
> Thanks.
>
> AllaG
>
>
--
Brian Lloyd
http://livingsocial.com
(c) 540.845.2975
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
Thank you for any help provided!
>
> Igor Fier
> Dept. of Physics, Condensed Matter
> UNESP Rio Claro Rio Claro-SP, Brazil
>
>
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Llo
compatible with it? Is there any big issue you have already imagine?
>
> Thanks
> Guillaume
>
>
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
;
> Thanks for this project, I would love to use it.
>
> --
>
> Greg
>
>
>
>
>
>
>
>
>
>
>
>
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.
Hi all - Python.NET isn't very actively maintained (unfortunately I don't
have any time to really work on it), though some users have stepped up to
contribute patches etc. over time. There are no plans for it to "go away",
though I expect that over time as the .NET platform evolves it will requ
esources to copy in Python interpreter folder ?
>
> Thanks in advance
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
Brian Lloyd 540.845.2975
[EMAIL PROTECTED]
___
On Fri, Nov 14, 2008 at 8:38 PM, Hamilton Link <[EMAIL PROTECTED]> wrote:
> ...
>
> I suppose the first question is,
> Why are there no apparent build instructions in the distribution?
>
Hi there - unfortunately I think the problem is that it would take a large
effort
to come up with a build p
is DynamicWebServiceHelpers the right namespace? Sure its not
IronPython.DynamicWebServiceHelpers or something?
The assembly name (AddReference) doesn't necessarily correspond
to the namespaces contained within...
-Brian
From: [EMAIL PROTECTED] on behalf of D
;
> 2008-04-01 15:10:11,740 cherrypy.msg INFO ENGINE: SystemExit raised:
> shutting down autoreloader
> 2008-04-01 15:10:11,741 cherrypy.msg INFO HTTP: HTTP Server shut down
> 2008-04-01 15:10:11,746 cherrypy.msg INFO ENGINE: CherryPy shut down
> -
>
>
> Do i need to do special thi
gt;
>
>
> __
> __
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
Sathish - If I understand correctly what you're asking, I think you might
need
to use the AsManagedObject method to retrieve the CLR object that a PyObject
wraps:
PyObject ob = GetMyObject(...)
Spam s = (Spam)ob.AsManagedObject(typeof(Spam));
hope this helps,
-Brian
On Jan 31, 2008 11:58 AM,
>
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
> you into the STA.
>
> import pythoncom
> pythoncom.CoInitialize()
>
> Maksim
>
> On 1/3/08 9:44 AM, "Brian Lloyd" <[EMAIL PROTECTED]> wrote:
>
>> Hi Sebastian - when you talk about it 'running perfectly with
>> the normal python.ex
t regards,
> Pablo
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
>>>> >>> NonQuery()
>> Traceback (most recent call last):
>> File "", line 1, in
>> NameError: name 'NonQuery' is not defined
>>>>> >>> NepcoV2.NonQuery()
>> Traceback (most recent call last):
>> File "", line 1, in
>> NameError: name 'NepcoV2' is not defined
>>>>> >>>
>> _
>> Python.NET mailing list - PythonDotNet@python.org
>> http://mail.python.org/mailman/listinfo/pythondotnet
>
>
>
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HD
> tDypao8Wcj9tAcJ >
>
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
have you tried explicitly calling this through the interface? You
need to do something similar to a cast in C#:
from mynamespace import Foo, Iface
inst = Foo() # create an instance
wrapped = Iface(inst) # 'cast' to the interface
wrapped.Func() # should now work
hope this helps,
-Brian
On
ge to the code was was trivial.
>
> However 2.2 is a no go for me. The API and ABI changes between 2.2 and
> 2.3 an too great and 2.2 is *really* old.
>
> Christian
>
> _
> Python.NET mailing lis
f.IFACE # OK
> f.IFACE.Func()# results in Attribute error
>
>
> Thanks,
> Alex
>
>
>
>
> _
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
the function in C#.
> Hello.py looks like this:
>
> def hello():
> return 'hello'
>
> def helloCallback():
> print "This is a Test and Of The python.net"
>
> Thanks
>
> Matt
>
>
> _
> Python.NET mailing list - PythonDotNet@pyth
builtin.GetAttr('True')}
>
> _bools = _getBools()
>
> Is the fact that "PyObject.FromManagedObject(obj)" doesn't work for
> booleans a bug? (Or is there an alternative method you can suggest?)
>
> All the best,
>
>
>
me MyNameSpace
>
> Any ideas what could be wrong? I am using .NET 2.0 and Python 2.5.
>
> Thanks...
>
> - Luis
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
that looks pretty slick - congrats!
-Brian
From: [EMAIL PROTECTED] on behalf of Michael Foord
Sent: Tue 10/23/2007 6:17 PM
To: pythondotnet@python.org
Subject: [Python.NET] Experimental C Extensions from IronPython with Python.NET
- code and article
Hello al
ith the GUI thread will probably make for some fun times and late nights
if you try to do anything too fancy ;)
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
>
>
> Christian
>
>
>
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
g GCHandle to map back and forth between managed
objects and the wrapped Python instances -- but its usually easier to
find some other way around the problem ;)
hope this helps,
--
Brian Lloyd
[EMAIL PROTECTED]
_
Python.NET
ld trunk and with the newer Christian's
> one.
>
> am I doing something wrong?
> Anyone as any clue?
>
> thanks in advance
>
> Alberto
>
> _____
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/
It should work with any managed assembly (vb,cpp, etc)
Sent from my iPhone
On Jul 9, 2007, at 11:02 AM, "Christian Heimes" <[EMAIL PROTECTED]>
wrote:
> Roman Yakovenko wrote:
>> Does it work with binaries ( Managed C++ DLL ) compiled for .Net 1.1?
>
> I don't know since I don't have any applic
Christian - do the overload tests pass for 2.4?
I'm out of town ATM but can look at those when I get back (sat).
Sent from my iPhone
On Jul 9, 2007, at 1:46 PM, "Christian Heimes" <[EMAIL PROTECTED]> wrote:
> Lacko Roman wrote:
>> I needed this python 2.5 version since previous year but was too
I'm pretty sure there were some changes to type structures in 2.5, so
probably the only sane thing to do would be to do a 2.5-specific branch :(
The interop stuff is some fairly deep voodoo - it essentially generates a
bunch of thunks and wrappers matching the in-memory layouts of various
python t
Hi Aaron -
PythonNet tip 'o the day: you can probably just construct the array in
Python as a normal list:
mylist = [[1, 2], [3, 4], ...]
If you pass that to a method with a signature that takes int[,] then
everything should Just Work so long as the lists and their contents
are actually conve
Note that the latest PythonNet is built for and includes 2.4, not 2.5,
unless you¹ve built
your own version.
That probably means that pythonnet is looking at the PYTHONPATH for 2.4,
which
probably doesn¹t have imaplib installed.
I¹d suggest making sure to install imaplib in the site-packages use
Hi Andy - this often means that an exception was thrown in the constructor
(the construction code needs some work and can give the wrong message in
this case).
At a total guess, I'd say the string you pass to the XmlObjectRestorer
probably wants
to be an actual xml string rather than a filename..
FYI, if you are getting a NameError using RunString that usually means that
the string
you run needs to do some imports remember that RunString creates
(essentially) a
totally new global local namespace, so you¹ll need to import any names you
need in
your code snippet.
e.g.
CLR.Food.SpamAn
Sorry about that someone had asked for info on using generics so I put up
in-progress documentation for the next rev and haven¹t had time to work on
making some of the stuff true yet :(
I¹ll try to at least get the docs to a sane state to avoid confusion over
the weekend.
-Brian
On 3/2/07 10:
Hi Tom last time I looked, key parts of reflection and interop were
missing from the CF. Python for .NET relies deeply and heavily on those ;)
-Brian
On 12/19/06 9:53 AM, "Tom Galvin" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am investigating the possibility of upgrading the gui of a pythonce h
Title: Re: [Python.NET] Build instructions
You should be able to checkout pythonnet-1.0-branch to get the latest stable set for 1.1.
-Brian
On 10/30/06 8:24 AM, "Meyer Kuno (Helbling Technik)" <[EMAIL PROTECTED]> wrote:
Hi all.
The current HEAD version (revno 39) of Python.NET has compliat
glad to hear you were able to compile it...
I'm _really_ _really_ trying to make some time to at least tie up a stable
2.x-compatible release - its tough with my current schedule though. If anyone
is out there chomping at the bit to contribute, please let me know ;) I don't
want to be the bloc
Are you certain that you have installed PIL into the instance of Python that
you are using with Python for .NET? This is easy to forget - if you are
using the 'built-in' python install that comes with Python for .NET, it will
*not* know about any packages you may have installed in a pre-existing
Py
Title: Re: [Python.NET] PythonNet and .NET 2.0 Question
Hi Maksim – it is safe to use it, you just won’t have access to 2.0-only features like generics, etc.
The latest in svn mostly supports generics and a number of other 2.0-isms, but I haven’t had any time to make a release or do much on it
Note that the PythonNet 1.x releases are packaged as distinct
releases for Python 2.3 and 2.4. Perhaps you installed the 2.3
release by mistake?
-Brian
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Filipe Correia
> Sent: Monday, July 10, 2006
Be careful of what you read in svn ;) That's where the release notes
etc. that *will be* 1.0 are being worked on, but there hasn't been a
1.0 yet (that pesky day-job has been busy lately).
FWIW - I'll clean up the warning, but otherwise the 1.0 branch
should be stable. There are a number of thi
I was going to say that the error message sounds like the code
is missing a 'using Python.Runtime'...
-Brian
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Matthew
> Pontefract
> Sent: Wednesday, June 14, 2006 3:25 AM
> To: Srivatsa, Radhika; H
Haran - you can't expose a 'module' (in the Python sense), but
you can easily do what you trying to do.
The usual pattern for this would be stow away a reference to your
application object in a static where the Python code can then get
it. Assuming you have an assembly 'my.app', this would look
they
are both essentially initializing a single C runtime, I could
imagine the GIL getting balled up in that case pretty easily.
-Brian
> -Original Message-
> From: Matthew Pontefract [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 06, 2006 11:37 AM
> To: Brian Lloyd; python
Hi Matthew -
This is a tough kind of problem to debug through email ;)
Is there any chance that the exceptions you raise cause any
of your C# to be called again?
If not, if there is any way you can distill your code to a
relatively small example that demonstrates the problem, send
it to me
> [mailto:[EMAIL PROTECTED] On Behalf Of Brian Lloyd
> Sent: Monday, June 05, 2006 9:28 AM
> To: Mathew Yeates; pythondotnet@python.org
> Subject: Re: [Python.NET] delegate funkiness
>
>
> > I have a delegate in python that returns a bool def returnFalse():
> >
> I have a delegate in python that returns a bool def returnFalse():
> return False
>
> However, when this function is called from my c# compiled
> .Net program it always sees a return value of True. Seen this before?
> (This is with the latest in svn)
>
> Mathew
Strange -- no, I haven't
Have you tried using the PythonEngine.RunString (not
RunSimpleString) method?
Still not as convenient as having a RunFile, but that
should do what you need for now.
-Brian
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of LIVERNAIS Sylvie
> Sent
Hi Radhika,
The Python for .NET unit test suite (in src/tests of the distro)
are probably a pretty good example of what you want to do.
-Brian
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Srivatsa, Radhika
> Sent: Thursday, June 01, 2006 1
Hi Markus -
a limitation of Python for .NET is that overrides you write in Python are only
visible to Python code. There is some possibility that in the future we could
generate a .NET subclass whenever you subclass in Python and provide delegate
implementations of overridden methods that wo
Lalit - I can't reproduce this on any version of Python for .NET. It
would be best if you could post the actual code you have rather than a
summary, as it is probably not something anyone can diagnose without
context.
-BrianOn 5/25/06, Lalit DIGARI <[EMAIL PROTECTED]> wrote:
Hello All,I
have a mod
make some __ __
> method to do this, allow indexing by None, or something else
> - neither of those sounds particularly wonderful.
>
>
> Do you want to help develop Dynamic languages on CLR?
> (http://members.microsoft.com/careers/search/details.aspx?JobI
> D=6D4754D
No, we're not dead yet ;) Probably suffering a little oxygen deprivation from IronPython, I suspect.I've been plugging away in svn on a 2.0 release, though things have become busy the last couple of weeks at that pesky day job.
-BrianOn 5/10/06, Roman Yakovenko <[EMAIL PROTECTED]> wrote:
On 5/10/06
HI Tiago - If I'm reading this right, I think the issue is that your method is returning a (Python) Template instance.The PythonNet runtime can't convert arbitrary Python types to anything that .NET can make sense of, so your method need to either return a
"primitive" Python type that maps to a pr
Apologies in advance for being inexcusably lazy -- does anyone out there know how to get
an IP build with its full test suite? The public release seems like it doesn't include everything,
and I'd like to get a better sense for the current state of code-compatibility...
-Brian
___
Hi all,
The current SVN (and upcoming releases) includes changes to support a refactored,
IronPython-compatible import syntax and assembly load behavior.
Where in releases to date you had to use the magic 'CLR' module as the root of all
CLR imports, now you can just say:
from System import *
Hi all,
I'd like to move to using NAnt as a build solution for Python for .NET. Realizing that toolchains are
always somewhat controversial, I think this would be the best solution because:
- it will be a lot easier than trying to replicate my quirky toolchain ;)
- it will handle *most* of
Sorry, I'm way behind on mail ;)
If I'm reading this right, the issue is that a Python dictionary does
not automatically convert to any particular .NET type (where your
tuples and ints were likely auto
converted to arrays and int32s). Generally speaking, you can't really
meaningfully
pass an arbit
Hi all -
For those that track between-release changes, I've switched the
pythonnet code base
over to Subversion:
https://sourceforge.net/svn/?group_id=162464
There is a branch '1.0-branch' that reflects the last 1.0 release, and
the trunk is where 2.x development is happening (though I have to g
Lalit,
If your C++ dll is a plain (unmanaged, machine-code) dll, you probably want to
take a look at ctypes:
http://starship.python.net/crew/theller/ctypes/
Python for .NET doesn't specifically help you use arbitrary unmanaged
dlls (but you
should have no problem using ctypes within Python for .
Hi all - One of the things I'd like the 2.x-compatible version of PythonNet to do is be code-compatible as much as possible with IronPython.A part of that is reconciling import syntax. Currently, you have to use the '
CLR.xxx' form to import modules in PythonNet, where in IronPython you can just sa
onic solution. Brian's question makes me wonder if Python can be
> all things to all programmers, and my thinking is: no, it can't. Trying to
> make it so will just pollute the language.
>
> --Thane
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL
Hi all - I'm cross-posting this to the IP list as the subject seems to
be an open issue there too.
I'm working on generics support for Python for .NET, and there a couple
of thorny issues that could use some discussion regarding naming and
resolution of generic types.
In C# you can explicitly na
Hi all -- It turns out that the lookup behavior appears to be different between 1.x and 2.x, in that 1.x was willing to look in the runtime install directory for assemblies but 2.x is not.You can work around this for now by adding the CLR runtime directory to
sys.path, e.g.:sys.path.append('C:\\Wi
Hopefully compiling will be a lot easier soon, as all the IL rewriting voodoo will be gone.
It is encouraging, though, that most of the tests run now on mono - I didn't get very far last time I tried ;^)
What is the state of the mono world at this point in terms of most
common version? I will try
FWIW, I've been working on refactoring the CVS code for .NET 2.x, and
I've run into this too. Something odd seems to have changed regarding
Assembly.LoadXXX (I also see in the test runs that Windows.Forms has
the same issue).
On the bright side, those are the only two tests failing in my sandbox w
Hi all -Sorry for not being as responsive as I should lately -- I've recently changed companies so things have been a little hectic and I also had to make sure the 'paperwork was in order' re: open source projects, etc.
Now that things have settled down a bit, I have been able to spend a little tim
The crash is probably related to the attached problem that
Michael worked through...
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Original Message-
> From: Stanislas Pinte [mailto:[EMAIL PROTECTED]
bridge with support for at least the
bigger changes in CLR 2.x.
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
_
Python.NET mailing list - PythonDotNet@python.org
ht
ents
>
>
> Is there a way to convert a python class instance to a .Net object and
> then convert it back to python class instance?
In this case, you should just be able to have PythonClass
inherit from System.Object - that will get it a default
conversion that should work for what you w
Hee hee - this is good news. I'm looking forward to getting
rid of that horrible IL hack... ;)
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Original Message-
> From: [EMAIL PROTECTED]
>
Thanks for the patch! I've been slammed lately and haven't
had time to wrap up 1.0 and make the 2.x branch ;(
Any details you can post on the access violations would be
helpful too (to me, anyway).
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Hi Guy -- as far as I know, you can't change the thread
state after any COM or interop calls have happened (and
Python for .NET is all interop...).
What you probably need to do is set the attribute in
the C# 'embedding' application before initializing the
python engine (or making any other int
uild the locals dict manually.
HTH,
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Michael Eddington
> Sent: Sund
For windows, you need to include CLR.dll and PythonRuntime.dll
(as well as anything from the standard Python distro that you
use, of course).
HTH,
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Origi
it to Int32 first... (same for Int64)
> ...
ooo - you've found a hole in the type conversion logic, methinks.
In the interim, you can use the following sneaky hack:
from CLR.System import IntPtr, Int32
i = Int32(32)
p = IntPtr.op_Explicit(i)
# now p is an intptr...
Brian
er introduces a
whole new world of problems), so at this point I'm only looking at
compatibility from a consumer perspective.
generic-'ly,
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
___
that could possibly work'
there, but I'd be happy to be wrong ;)
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf O
st tokens
with special meaning to the compiler and dont have a runtime
representation), but you can do what you want with something
like:
import CLR
from CLR.System import Type
mytype = Type.GetType("MyNamespace.MyType")
fields = mytype.GetFields()
...
hope this helps,
Brian L
more wrapper classes that
would delegate to your Python code.
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
> -Original Message-
> From: Philippe C. Martin [mailto:[EMAIL PROTECTED]
> Sent: Friday, J
ippe -
That is not correct - actually, pythonnet is the opposite of
that ;) It makes any .NET code accessible in a natural way as
if they were Python objects. It does not generate IL, so it
can't be used generally to expose existing Python code to the
.NET world.
Brian Lloyd[EMAI
Hmm,
you mention RC5 -- do you mean RC2? An example code snippet would
help
here, as the unit tests actually use NullReferenceException and they are
running fine for me...
Brian Lloyd
[EMAIL PROTECTED]V.P. Engineering
540.361.1716 Zope
Corporation http
when a delegate type is required -- I'd want to think
about any possible side-effects of that and work out what level of
error checking (sig-checking on the callable) would be appropriate
first though...
HTH,
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Paint and have the right thing happen).
You should be able to register a Python callback for the Paint
event though.
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
_
Pyth
rom
System.Exception? If so, it should work...
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python
n that the usefulness would be limited (again, because
most managed languages work against compile-time metadata, a
Python-generated managed subclass wouldn't really be useful for
defining new types unless it could be persisted to an assembly
for other managed code to build against).
eases.
Enjoy! ;)
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet
Hi all -
So to summarize this thread: we want to make __str__ of a CLR
exception return self.Message, right? That would seem to match
the behavior of the std Python exceptions.
Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering 540.361.1716
Zope Corporation http
I'm pretty sure that Python.Runtime.dll will need to be in the
same directory as your python.exe (because of .NET assembly
probing rules). The CLR.dll can probably be either in the
DLLs directory or in the root directory with python.exe.
Brian Lloyd[EMAIL PROTECTED]
V.P. Engine
1 - 100 of 132 matches
Mail list logo