Re: [Python.NET] running pythonnet on MAC OSX[new to MAC and not not a programmer]

2013-06-13 Thread b...@fie.us
So, firstly, I build my own 64bit mono.  In that last thread, I said I was doing it off of their tar ball.I updated that slightly.  I now maintain my own local "mac ports" port file.Attached is the latest one I built.  It may need updating.  And at the very least, you probably want to update it to

Re: [Python.NET] running pythonnet on MAC OSX[new to MAC and not not a programmer]

2013-06-13 Thread b...@fie.us
Ahh. Yes. I do it differently these days. Will get back to you shortly. -brad On Jun 12, 2013, at 10:35 AM, Alon Dulce wrote: > Hi, > > I want to run python.NET on MAC OSX (Mountain Lion) and since I'm new to > MAC/UNIX and I'm not a programmer I naturally turned to the web: > > *1st : I

Re: [Python.NET] I need to use C# list as an object for one of my controls

2013-05-23 Thread b...@fie.us
What exactly are you trying to do? It looks like you are trying to create a class in python that inherits from .net's System.Object, rather than python's object. But then you treat it as a dynamic object, which it really isn't. And then you try and treat it as a statically typed object, which

Re: [Python.NET] Importin­g .NET assembly with "." ­(dot) in the name

2013-04-30 Thread b...@fie.us
You are confused. Mark was pointing out that since an assembly is not necessarily named on disk, the same as the namespaces within it, you need to AddReference the assembly on disk, and THEN import the namespace. And the namespace may not be named the same as the reference. PythonNet is perfe

Re: [Python.NET] How to turn on console window from Windows System while debugging Embedded PythonNet app?

2013-04-05 Thread b...@fie.us
gt; see/capture the text output? (I know it will work but want to capture the > output) > > Any idea? > > > On Thu, Apr 4, 2013 at 6:38 PM, [email protected] wrote: > It's an escape character issue. > > Since you are pasting source code in your source code, you need

Re: [Python.NET] How to turn on console window from Windows System while debugging Embedded PythonNet app?

2013-04-04 Thread b...@fie.us
directory: 'c:\temp\x07.py' > > I don't know why it converted to 'c:\temp\x07.py' from 'c:\temp\a.py', and > got the error. Any idea? > > > > > On Thu, Apr 4, 2013 at 2:25 PM, Seungweon Park wrote: > As you see the screenshot,

Re: [Python.NET] How to turn on console window from Windows System while debugging Embedded PythonNet app?

2013-04-04 Thread b...@fie.us
t; 1. How to turn on console window(live) from Windows System while > debugging Embedded PythonNet app? > 2. How to capture python script execution output from C# code? > > I've been talking to [email protected] about my issue which I can't get the output >

Re: [Python.NET] Would you share your idea how to call python command from embedded Python.Net?

2013-04-01 Thread b...@fie.us
Yes it is supposed to work. But I'd point out that there is a big difference between the statements: print 2+3 and 2+3 What exactly would you expect to get back as a return from the print statement? On Apr 1, 2013, at 2:00 PM, Seungweon Park wrote: > Hi, > > I've been played with Python.Ne

Re: [Python.NET] How to run a command by Embedded Python?

2013-03-28 Thread b...@fie.us
Doesn't it just depend on where you want the async to be? On the python side or on the .net side? You could do it all in the python side and just stick to python async methodologies. Or you could do it in .net in which case you need to use the multi-threaded aspects of pythonnet. -brad On M

Re: [Python.NET] how to load and execute py file which consumes a thrid part C-based python extension in C# code

2013-03-28 Thread b...@fie.us
ystem.Console.WriteLine("Released Lock"); return ret; On Mar 28, 2013, at 5:34 PM, "[email protected]" wrote: > In my code I'm running: > > Python.Runtime.PythonEngine.Initialize(); > > I also have these defined: > >

Re: [Python.NET] how to load and execute py file which consumes a thrid part C-based python extension in C# code

2013-03-28 Thread b...@fie.us
In my code I'm running: Python.Runtime.PythonEngine.Initialize(); I also have these defined: public void AddPythonPath(string path) { CheckInitPython(); IntPtr l = Python.Runtime.PythonEngine.AcquireLock(); Python.Runtime.Python

Re: [Python.NET] How to compile Python for .Net in VS2010 and .NET 4?

2013-03-22 Thread b...@fie.us
Your python was built with UCS2 unicode support, rather than UCS4. There is a compiler directive in the VS project of pythonnet for that. Pythons that are compiled UCS2 and UCS4 respectively, are binary incompatible with one another. Hence, pythonnet cannot target both at the same time. -bra

Re: [Python.NET] How to use Python for .NET? Have a problem to use in Windows 2008 R2 SP1

2013-03-22 Thread b...@fie.us
python27.dll is likely not in your path. So it can't dynamically link to it. There are a lot of ways to remedy that. Adding your python 2.7 install to your path. Or moving the pythonnet binaries into your python 2.7 install. You could also edit the .config file for the pythonnet install to gi

Re: [Python.NET] Loading C# DLLs from CPython

2013-03-20 Thread b...@fie.us
You are incorrect that it's just an interpreter. That is one thing it can do. But it also acts as a module. For example, I have pythonnet and .net dlls importing into Autodesk Maya, which is a third party product that embeds it's own cPython. It can get a little more complicated if you need

Re: [Python.NET] Problem with System.ArgumentException in call to method from dll

2013-01-23 Thread b...@fie.us
Out of curiosity Barton, could you pass "None" rather than constructing instances? Or does it truly need the argument to have a type in order to disambiguate overloaded methods? Also, it is my understanding that in iPy, out parameters are often omitted from the method's arguments. But in Pyth

Re: [Python.NET] Problem with System.ArgumentException in call to method from dll

2013-01-22 Thread b...@fie.us
uments > > So it seems that I have to pass the "out"-parameter to the method as well, > but that was not working either. > > > > 2013/1/22 [email protected] > You are setting the bitmapsrc variable to be equal to the class BitmapSource. > I assume you mean to ge

Re: [Python.NET] Problem with System.ArgumentException in call to method from dll

2013-01-22 Thread b...@fie.us
You are setting the bitmapsrc variable to be equal to the class BitmapSource. I assume you mean to get the value of an output parameter, rather than pass a class object into the method. Though I do not speak german. But I think that's it. On Jan 22, 2013, at 2:58 PM, Daniel Krause wrote: >

Re: [Python.NET] How to use BitmapSource from System.Windows.Media.Imaging ?

2013-01-22 Thread b...@fie.us
it uses .NET > 4.0 as default? If that is true, it should work, but I had to add the path to > get the script running. > > > 2013/1/21 [email protected] > You should be wary of that hard coded path. > > My best guess as to why the namespace is not provided is that the .net > f

Re: [Python.NET] How to use BitmapSource from System.Windows.Media.Imaging ?

2013-01-21 Thread b...@fie.us
You should be wary of that hard coded path. My best guess as to why the namespace is not provided is that the .net framework that is being loaded is pre .net 3.0. I think python.net compiles to 2.0 by default but I'd need to check that. That Windows.Media.Imaging namespace only became availabl

Re: [Python.NET] success… pythonnet running in maya on osx64bit

2013-01-09 Thread b...@fie.us
"maya" for mayapy and "mayapy" for maya. On Jan 9, 2013, at 12:47 PM, "[email protected]" wrote: > success… pythonnet running in maya on osx64bit > > It took a good amount of hacking. But it does work. > > I'm going to work on wrapping all my chan

[Python.NET] success… pythonnet running in maya on osx64bit

2013-01-09 Thread b...@fie.us
success… pythonnet running in maya on osx64bit It took a good amount of hacking. But it does work. I'm going to work on wrapping all my changes and fixes into a patch or two. However, some general notes: You need to build your own mono in 64 bit mode, because they don't ship a precompiled 64b

[Python.NET] assemblymanager and reflection only assemblies

2012-10-26 Thread b...@fie.us
fyi: I ran into a bug and fixed it… I think? Some thoughts on what I did? I am writing an application that loads plugins. As part of that, it first loads the plugin assembly in "reflection only" mode. pythonnet's assemblymanager.cs registers a handler at line 54. it gets called when I load t