Re: [Python.NET] Sending a buffer (pointer?) to a C# function

2017-03-09 Thread Brian Lloyd
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

Re: [Python.NET] call python in Visual C# WinForm application

2016-10-13 Thread Brian Lloyd
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

Re: [Python.NET] surveying the landscape ...

2015-06-15 Thread Brian Lloyd
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

Re: [Python.NET] Python for .NET load .dll

2015-06-08 Thread Brian Lloyd
, >- > > 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

Re: [Python.NET] Mailinglist config

2013-11-27 Thread Brian Lloyd
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]

Re: [Python.NET] Mailinglist config

2013-11-26 Thread Brian Lloyd
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

Re: [Python.NET] Passing by reference

2012-05-18 Thread Brian Lloyd
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

Re: [Python.NET] Is Python .NET Alive?

2012-05-15 Thread Brian Lloyd
_________ > 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

Re: [Python.NET] Using a managed private DLL in python for .NET‏

2012-04-06 Thread Brian Lloyd
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

Re: [Python.NET] python for .net

2012-01-22 Thread Brian Lloyd
** > > ** > 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

Re: [Python.NET] building on linux, mono 2.8.1

2010-12-11 Thread Brian Lloyd
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 >>

Re: [Python.NET] Python for .NET installation problem

2010-12-01 Thread Brian Lloyd
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

Re: [Python.NET] embed Python in C#

2010-08-16 Thread Brian Lloyd
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

Re: [Python.NET] python 3.0

2009-05-12 Thread Brian Lloyd
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 --

Re: [Python.NET] tuple not recognized as a type ?

2009-05-01 Thread Brian Lloyd
; > Thanks for this project, I would love to use it. > > -- > > Greg > > > > > > > > > > > > > _ > Python.NET mailing list - PythonDotNet@python.org > http://mail.

Re: [Python.NET] How to use IIS Session ID in Dojo and Python - any demo scripts?

2009-03-03 Thread Brian Lloyd
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

Re: [Python.NET] Cannot initialize OLE

2008-12-01 Thread Brian Lloyd
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] ___

Re: [Python.NET] questions from a new PythonNet user

2008-11-28 Thread Brian Lloyd
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

Re: [Python.NET] Dynamic Web Service Helpers

2008-04-02 Thread Brian Lloyd
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

Re: [Python.NET] Problems using Python.net in a TurboGears App on ubuntu/mono

2008-04-01 Thread Brian Lloyd
; > 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

Re: [Python.NET] How to manipulate python module property from C#?

2008-02-08 Thread Brian Lloyd
gt; > > > __ > __ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping >

Re: [Python.NET] converting Pyobject to user defined type data structures

2008-02-02 Thread Brian Lloyd
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,

Re: [Python.NET] Memory Leak in MFC/C++ based Python Extended/Embedded code.

2008-01-08 Thread Brian Lloyd
> > _____ > 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

Re: [Python.NET] dotnet, threading and py2exe

2008-01-03 Thread Brian Lloyd
> 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

Re: [Python.NET] dotnet, threading and py2exe

2008-01-03 Thread Brian Lloyd
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

Re: [Python.NET] Accessing Public Functions in Module

2007-12-18 Thread Brian Lloyd
>>>> >>> 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

Re: [Python.NET] Accessing class interface with private methods

2007-12-12 Thread Brian Lloyd
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

Re: [Python.NET] Trouble getting Python for .NET to work in Ableton Live

2007-12-12 Thread Brian Lloyd
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

Re: [Python.NET] Accessing class interface with private methods

2007-12-11 Thread Brian Lloyd
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

Re: [Python.NET] bridging C# and Python

2007-11-28 Thread Brian Lloyd
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

Re: [Python.NET] FromManagedObject and Booleans

2007-11-02 Thread Brian Lloyd
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, > > >

Re: [Python.NET] Loading custom Assembly with Assembly.Load

2007-10-29 Thread Brian Lloyd
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

Re: [Python.NET] Experimental C Extensions from IronPython with Python.NET - code and article

2007-10-23 Thread Brian Lloyd
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

Re: [Python.NET] problem with inheritance? ironpython ok, python.net - different

2007-10-19 Thread Brian Lloyd
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

Re: [Python.NET] python 2.5

2007-10-19 Thread Brian Lloyd
> > > 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

Re: [Python.NET] problem with inheritance? ironpython ok, python.net - different

2007-10-19 Thread Brian Lloyd
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

Re: [Python.NET] Packages are wrongly initialized?

2007-08-01 Thread Brian Lloyd
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/

Re: [Python.NET] Testers for new branch wanted

2007-07-12 Thread Brian Lloyd
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

Re: [Python.NET] Testers for new branch wanted

2007-07-12 Thread Brian Lloyd
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

Re: [Python.NET] Python 2.5 compatibility and interop.cs

2007-07-02 Thread Brian Lloyd
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

Re: [Python.NET] Installing Python for .NET with .NET 2.0?

2007-04-20 Thread Brian Lloyd
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

Re: [Python.NET] Unable to import library imaplib

2007-04-11 Thread Brian Lloyd
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

Re: [Python.NET] Simple newbie constructor problem :-(

2007-03-09 Thread Brian Lloyd
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..

Re: [Python.NET] RunString does not work

2007-03-05 Thread Brian Lloyd
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

Re: [Python.NET] Using Third Party C# Libraries

2007-03-02 Thread Brian Lloyd
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:

Re: [Python.NET] Subset implementation for CompactFramework

2006-12-19 Thread Brian Lloyd
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

Re: [Python.NET] Build instructions

2006-10-30 Thread Brian Lloyd
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

Re: [Python.NET] ClrModule could not be found error?

2006-10-01 Thread Brian Lloyd
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

Re: [Python.NET] Can't Import PIL Image

2006-09-18 Thread Brian Lloyd
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

Re: [Python.NET] PythonNet and .NET 2.0 Question

2006-08-30 Thread Brian Lloyd
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

Re: [Python.NET] Python.net with Mono and *nix

2006-07-12 Thread Brian Lloyd
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

Re: [Python.NET] Python.NET 1.0 Final

2006-06-16 Thread Brian Lloyd
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

Re: [Python.NET] exposing modules

2006-06-14 Thread Brian Lloyd
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

Re: [Python.NET] exposing modules

2006-06-09 Thread Brian Lloyd
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

Re: [Python.NET] .NET 2 and hang with AcquireLock

2006-06-06 Thread Brian Lloyd
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

Re: [Python.NET] .NET 2 and hang with AcquireLock

2006-06-06 Thread Brian Lloyd
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

Re: [Python.NET] delegate funkiness

2006-06-05 Thread Brian Lloyd
> [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(): > >

Re: [Python.NET] delegate funkiness

2006-06-05 Thread Brian Lloyd
> 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

Re: [Python.NET] How to run a .py file from C#

2006-06-01 Thread Brian Lloyd
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

Re: [Python.NET] Using Python to test .NET application

2006-06-01 Thread Brian Lloyd
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

Re: [Python.NET] Problems with subclasses...

2006-05-26 Thread Brian Lloyd
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

Re: [Python.NET] Hanging the application in import

2006-05-26 Thread Brian Lloyd
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

Re: [Python.NET] [IronPython] Naming and resolution of generic types (complete!)

2006-05-23 Thread Brian Lloyd
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

Re: [Python.NET] Hello??

2006-05-12 Thread Brian Lloyd
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

Re: [Python.NET] Problem passing parameters to a python function from C#

2006-05-12 Thread Brian Lloyd
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

[Python.NET] full IronPython test suite?

2006-04-18 Thread Brian Lloyd
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 ___

[Python.NET] deprecation of CLR module, implicit assembly loading

2006-04-18 Thread Brian Lloyd
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 *

[Python.NET] NAnt as a build solution

2006-04-18 Thread Brian Lloyd
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

Re: [Python.NET] Delegates and Dictionaries

2006-04-04 Thread Brian Lloyd
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

[Python.NET] FYI: Switch to Subversion

2006-04-04 Thread Brian Lloyd
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

Re: [Python.NET] Use of c++ dll in python

2006-04-04 Thread Brian Lloyd
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 .

[Python.NET] import changes for 2.x

2006-04-03 Thread Brian Lloyd
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

Re: [Python.NET] Naming and resolution of generic types (complete!)

2006-04-01 Thread Brian Lloyd
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

[Python.NET] Naming and resolution of generic types (complete!)

2006-03-31 Thread Brian Lloyd
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

Re: [Python.NET] System.Data.dll

2006-03-30 Thread Brian Lloyd
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

Re: [Python.NET] problems with mono 1.1.13.4 and PythonNet beta 5

2006-03-22 Thread Brian Lloyd
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

Re: [Python.NET] importing System.Data

2006-03-22 Thread Brian Lloyd
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

[Python.NET] Python for .NET now at sourceforge

2006-03-13 Thread Brian Lloyd
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

Re: [Python.NET] Any plans for supporting CLR2.0?

2006-01-25 Thread Brian Lloyd
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]

Re: [Python.NET] Any plans for supporting CLR2.0?

2006-01-25 Thread Brian Lloyd
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

Re: [Python.NET] Custom delegates and wrapping class instance in .netobject

2006-01-19 Thread Brian Lloyd
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

Re: [Python.NET] Updates to callconvutil.cs for .NET 2.0

2005-09-20 Thread Brian Lloyd
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] >

Re: [Python.NET] Updates to callconvutil.cs for .NET 2.0

2005-09-16 Thread Brian Lloyd
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

Re: [Python.NET] winForms, threading and dragdrop ?

2005-09-12 Thread Brian Lloyd
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

Re: [Python.NET] Adding PyRun_String to Runtime

2005-08-15 Thread Brian Lloyd
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

Re: [Python.NET] packaging pythondotnet with py2exe

2005-08-10 Thread Brian Lloyd
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

Re: [Python.NET] Trying to constructu a System.IntPtr object

2005-07-29 Thread Brian Lloyd
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

[Python.NET] IP & Python for .NET 2.0 roadmap

2005-07-25 Thread Brian Lloyd
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 ___

Re: [Python.NET] Subset implementation for CompactFramework

2005-07-25 Thread Brian Lloyd
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

Re: [Python.NET] Is it possible to access the C# keywords?

2005-07-17 Thread Brian Lloyd
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

Re: [Python.NET] Newbie question

2005-07-08 Thread Brian Lloyd
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

Re: [Python.NET] Newbie question

2005-07-08 Thread Brian Lloyd
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

Re: [Python.NET] catching exceptions thrown from .Net

2005-07-05 Thread Brian Lloyd
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

Re: [Python.NET] Creating Menu Items

2005-07-05 Thread Brian Lloyd
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

Re: [Python.NET] Overriding OnPaint

2005-07-05 Thread Brian Lloyd
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

Re: [Python.NET] catching exceptions thrown from .Net

2005-07-05 Thread Brian Lloyd
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

Re: [Python.NET] attribute semantics question

2005-06-15 Thread Brian Lloyd
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).

[Python.NET] Announce: Python for .NET 1.0 RC2 released

2005-06-05 Thread Brian Lloyd
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

Re: [Python.NET] Small improvment for CLR exceptions

2005-05-31 Thread Brian Lloyd
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

Re: [Python.NET] running .net with standard 2.4.1 installation

2005-05-31 Thread Brian Lloyd
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   2   >