Re: [Python.NET] How to show the Console window

2011-03-01 Thread Oleksii Bidiuk
Hi Sharon, I haven't found a way to run a console, but I had achieved a similar effect by redirecting the stdout and stderr from within Python (as suggested some time ago by Guido himself in a related embedded CPython post) to a .NET object and then show the incoming strings in a TextBlock (I am u

Re: [Python.NET] Setting PYTHONPATH from code

2011-02-10 Thread Oleksii Bidiuk
Hi Sharon, What do you want to achieve with this? If you want to provide path for loading your own modules you can change the sys.path value by e.g. running a 'initialization' script with import sys sys.path.insert(0, 'your/own/path') You can build up the script above in C# by inserting the path

[Python.NET] Multiple Initialize, RunSimpleString, Shutdown calls result in AccessViolationException

2011-02-09 Thread Oleksii Bidiuk
Hi All, I am seeing weird problems with embedding PythonNET/Python 2.6 in a C#, using 4.0 runtime application built with VS2010 on Windows XP SP3. Design outline For every script I execute the following sequence on a separate thread (does not seem to matter the same or differ

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
> installed it will not load the python dll. > > By forcing a 32 - bit build the python executable was able to load the > python dll. > > Thanks for your support, > Bart > > On Tue, Feb 8, 2011 at 2:34 PM, Oleksii Bidiuk > wrote: > > Hi Bart, > > >

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
ur build environment, it significantly slows down > our build process. > > Regards, > Bart > > On Tue, Feb 8, 2011 at 11:08 AM, Oleksii Bidiuk > wrote: > > Hi Bart, > > the python26.dll is installed to the c:\windows\system32\ folder > regardless > > o

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
Hi Bart, the python26.dll is installed to the c:\windows\system32\ folder regardless of where your main Python installation goes to. I've seen similar problem when I have copied the Python26 folder to a new machine and forgot to take the python26.dll along. Check if you have the python26.dll in pl

Re: [Python.NET] Operator overloading for managed objects

2011-02-08 Thread Oleksii Bidiuk
Hi All, I am sorry for repeating the question, but I would like to make sure I am not overlooking something here. Is this a known limitation that the operators overloaded in C# are not working from CPython? So far I had written CPython wrappers for the .NET objects that provide proper operators im

Re: [Python.NET] InvalidOperationException when calling a generic method on an instance

2011-01-25 Thread Oleksii Bidiuk
Hi All, It seems that I was missing the type in the call to a generic method, myClassInstance.MyMethod[type]() seem to work. Sorry for my impatience. 2011/1/25 Oleksii Bidiuk > Hi All, > > does anybody have experience with getting > the InvalidOperationException exception wh

[Python.NET] InvalidOperationException when calling a generic method on an instance

2011-01-25 Thread Oleksii Bidiuk
Hi All, does anybody have experience with getting the InvalidOperationException exception when calling a generic method defined like generic MyClass::AnotherClass^ MyClass::MyMethod() { ... } When I create an instance of the MyClass and call the MyMethod() the exception mentioned above is throw

[Python.NET] Operator overloading for managed objects

2011-01-21 Thread Oleksii Bidiuk
Hi, did anybody have experience with using overloaded operators for managed objects? I have a class that have e.g. the operator+ overloaded in C#, but that does not seem to be picked up from the Python side. I have tried to add overloading using the setattr(MyType, "name", method_name), but it onl

Re: [Python.NET] Python.NET and VS2001/.NET 4.0

2011-01-21 Thread Oleksii Bidiuk
Hi All, A small correction to my post. Revision 122 seem to contain all the code, only the reference to the constructorbinding.cs is missing in the Python.Runtime.csproj. Simply adding a reference solves the problem! 2011/1/17 Oleksii Bidiuk > Hi All, > > I hope this will help some pe

Re: [Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-20 Thread Oleksii Bidiuk
Hi Barton, any news on the problem with ConstructorBinder/ConstructorBinding below? It seems like the ConstructorBinding class was not checked in. Could this be the case? Thanks in advance. 2011/1/17 Oleksii Bidiuk > Hi Barton, > > thanks for the update! I've got the latest ve

[Python.NET] Python.NET and VS2001/.NET 4.0

2011-01-17 Thread Oleksii Bidiuk
Hi All, I hope this will help some people like me searching for an answer. Several steps were mentioned by other people as well, but I haven't seen a step-by-step guide. It is not my intention to duplicate other posts in that sense, but rather have all-in-one post. Here is how I've got VS2010 and

Re: [Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-17 Thread Oleksii Bidiuk
t? What changes do you expect for proper .NET 4.0 support? I see the clrmodule.il and the buildclrmodule.bat refering to 2.0 runtime. Is it enough to change these two? 2011/1/16 Barton > This has been pushed to the trunk @ version 122 on the 9th of January, > 2011. > See the Tracker/Patches

Re: [Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-11 Thread Oleksii Bidiuk
) branch. I could do > this merge by this weekend if folks will find it useful. > -Barton > > > On 1/6/2011 6:59 AM, Oleksii Bidiuk wrote: > > Hi Alla, > > thanks for your prompt repsonse. In Python terms String('A') means > constructor with a string

Re: [Python.NET] PythonDotNet - IronPyton

2011-01-10 Thread Oleksii Bidiuk
g point to be future proof if you have to make a strategic choice for long term. Other opinions on this subject are highly appreciated! 2011/1/10 Mark Tigges > On Mon, Jan 10, 2011 at 4:18 AM, Emmanuel Lambert > wrote: > > Hi Oleksii Bidiuk, > > > > While access to the

Re: [Python.NET] PythonDotNet - IronPyton

2011-01-10 Thread Oleksii Bidiuk
Hi Emmanuel, The basic differences are highlighted in several discussions like http://stackoverflow.com/questions/1168914/ironpython-vs-python-net In short IronPython is a complete managed implementation of Python interpreter i

Re: [Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-08 Thread Oleksii Bidiuk
Yes please! 2011/1/7 Barton > I've got this working on my private (for the moment) branch. I could do > this merge by this weekend if folks will find it useful. > -Barton > > > On 1/6/2011 6:59 AM, Oleksii Bidiuk wrote: > > Hi Alla, > > thanks for your prom

[Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-06 Thread Oleksii Bidiuk
ded constructor, which is supported by > a special "__overloads__" attribute on a class: > > from System import String, Char, Int32 > > > > s = String.__overloads__[Char, Int32]('A', 10) > > > > I hope you succeed, > > > Alla > > >

[Python.NET] PythonNET 2.0 Alpha2 and .NET 4.0

2011-01-06 Thread Oleksii Bidiuk
Hi, I am trying to use Python for .NET under VS2010 and .NET 4.0. I've downloaded the pythonnet-2.0-alpha2.zip and changed the project settings to use .NET 4.0 under VS2010 and recompiled everything. The resulting python.exe can be run, and statements like "import clr" and "from System import Stri