Re: [Python.NET] Cannot initialize OLE

2008-12-01 Thread Feihong Hsu
I believe Brian's assessment is correct. The easiest way to handle this is to use pywin32's pythoncom module to set the threading model. You can find a sample of how to do that here: http://www.ironpython.info/index.php/Using_the_WebBrowser_Widget In the sample, the WebBrowser widget (which use

Re: [Python.NET] error messages

2008-09-30 Thread Feihong Hsu
From: Dirk Krause <[EMAIL PROTECTED]> Subject: AW: AW: [Python.NET] error messages To: "Feihong Hsu" <[EMAIL PROTECTED]>, "Craig Farrow" <[EMAIL PROTECTED]> Cc: [email protected] Date: Tuesday, September 30, 2008, 1:57 PM hmmm ... I have SP1 for sure

Re: [Python.NET] error messages

2008-09-30 Thread Feihong Hsu
Usually you can find a clue by looking in Control Panel > Add/Remove Programs. If you got SP1 or something like that, it'll be listed. --- On Tue, 9/30/08, Dirk Krause <[EMAIL PROTECTED]> wrote: From: Dirk Krause <[EMAIL PROTECTED]> Subject: AW: [Python.NET] error messa

Re: [Python.NET] error messages

2008-09-30 Thread Feihong Hsu
This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tu

Re: [Python.NET] Passing Dictionary from python to C#

2008-06-11 Thread Feihong Hsu
This is not supported. However, you can easily put the values of the Python dictionary into a .NET dictionary object. Unfortunately I'm not at a computer that has Python.NET installed, but I believe the following would work: from System.Collections.

Re: [Python.NET] PythonDotNet Digest, Vol 52, Issue 2

2008-03-20 Thread Feihong Hsu
t > >[EMAIL PROTECTED] > > > > When replying, please edit your Subject line so it is more > specific > > than "Re: Contents of PythonDotNet digest..." > > > > > > Today's Topics: > > > > 1. PyCon 2008 (Feihong Hsu)

[Python.NET] PyCon 2008

2008-03-19 Thread Feihong Hsu
I just got back from PyCon 2008 yesterday. I had a great time. For anyone who might be interested, here is the URL for my handouts from the talk: http://us.pycon.org/2008/conference/schedule/event/23/ I want to thank Brian Lloyd, Christian Heimes, and the other contributors to Python.NET. This

[Python.NET] PyCon 2008 Open Space

2008-03-04 Thread Feihong Hsu
- Using .NET Libraries in CPython, by Feihong Hsu - IronPython: The Road Ahead, by Jim Hugunin - End-user computing without tears using Resolver, an IronPython spreadsheet, by Giles Thomas - Python in your Browser with IronPython & Silverlight, by Michael Foord * Di

Re: [Python.NET] Patches and new release

2008-02-27 Thread Feihong Hsu
I recommend splitting up the binaries and the source files when you do the release. The binaries should have names that make it really clear what platform and Python version they are for, e.g. pythonnet-2.0-alpha3-py2.5-clr2.0.zip pythonnet-2.0-alpha3-py2.4-mono2.0.zip I think that would make thi

Re: [Python.NET] Errors with Python.Net 2.0 SP 1

2008-02-15 Thread Feihong Hsu
Yes! That did the trick. Thanks so much for tracking the problem down! - Feihong --- Nicolas Lelong <[EMAIL PROTECTED]> wrote: > After having setup a minimum repro case for a MSDN Forum > (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=2735385&SiteID=1), > I came up with a simple work

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

2007-12-18 Thread Feihong Hsu
Can you access these same functions in C#? Maybe what you have to do is write a wrapper library for your VB.NET library in C#, and have Python access the library through the the wrapper. - Feihong Kyle Stevens <[EMAIL PROTECTED]> wrote: We have an application that was developed in Visual Basi

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

2007-12-11 Thread Feihong Hsu
Python 2.2 is a seriously old version of Python. There's no download of Python.NET for Python 2.2 that I can see. You'd have to compile that yourself, and I don't even know what version of Visual C++ was used to compile Python 2.2 for Windows. Maybe the best solution at this point would be to us

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

2007-12-09 Thread Feihong Hsu
This is not supported. You can't access private methods in C# or VB.NET either, so why should Python.NET be able to access them? But one thing to note is that you CAN access protected methods directly in Pyhon.NET (you don't have to make a subclass to use a protected method). - Feihong alex om

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

2007-11-28 Thread Feihong Hsu
Have you tried using callbacks through delegates instead? In practice I haven't had any problems doing stuff like that. For example the following works fine: def callback(sender, args): print 'You clicked on', sender.Text btn = Button() btn.Text = 'Click me!' btn.Click += callback

Re: [Python.NET] Pithon.net or iron python??

2007-11-23 Thread Feihong Hsu
Yes, it is possible to "mix" C# and Python. You can have Python use classes and methods defined in a .NET assembly (DLL file), or you can create the PythonEngine object in your C# code and run Python scripts using that. There's no way to answer the second question without knowing more details.

Re: [Python.NET] Added 64-bit support, delegates/events broken?

2007-11-19 Thread Feihong Hsu
Are you talking about Python.NET 1.0 or 2.0? I still haven't tried Python.NET 2.0 on my 64-bit workstation, but 1.0 crashes when I try to use Interop assemblies. I'm not seeing any problems in 1.0 with respect to delegates/events on x64. - Feihong John Burnett <[EMAIL PROTECTED]> wrote: Ad

Re: [Python.NET] Can I create extension file by C#?

2007-11-06 Thread Feihong Hsu
Just make an ordinary C# class, then when you compile it make sure to use the /target:library switch. Once it's inside a .DLL file, you can use that class from IronPython. C# file (Example.cs): using System; namespace Example { public class ExampleClass { public void ExampleMet

Re: [Python.NET] python 2.5

2007-10-08 Thread Feihong Hsu
Hi, I ran into exactly the same problem as you but I did manage to solve it by recompiling the entire project in visual c# express. Unfortunately, I don't recall exactly what I did and I don't have my laptop handy right now, but I can find out later. In the meantime, you can try the recompil