Re: [Python.NET] C# components for script

2008-11-12 Thread Tribble, Brett
Yes, they can be anywhere, you just need to write some code to add them to the SYSTEM path for the current running code. Optionally, you can also tell .NET where to look for the assembly's config file. import sys import clr import System loadDir = 'C:/myAssemblyPath/' assemblyName = 'myDLL.dll'

Re: [Python.NET] ipython

2009-04-13 Thread Tribble, Brett
In theory it should work, but I haven't tried it myself. It certainly works from the interactive Python "shell" in Maya. Copy clr.pyd and python.runtime.dll into a directory that is part of IPython's %pythonpath% and also part of the system path %path%. Load the clr with the "import clr" statem

Re: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

2009-04-14 Thread Tribble, Brett
1. Is it a managed assembly or an unmanaged .dll? 2. If it is a managed assembly, is it registered in the GAC? See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713 also try: clr.AddReference('nameOfAssembly'). Note that you do not need to include '.dll' This assumes th

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

2009-05-01 Thread Tribble, Brett
If you have your .net assembly put up a modal dialog (messagebox), you can attach to the process from DevStudio, set breakpoints, etc. From: pythondotnet-bounces+btribble=maxis@python.org [mailto:pythondotnet-bounces+btribble=maxis@python.org] On Behalf Of Grégoire Dooms Sent: Friday,

Re: [Python.NET] Python.Net and DataRow

2009-08-14 Thread Tribble, Brett
Can you use this instead? from System.Data import DataTable, DataRow ttable = DataTable() mydatar = ttable.NewRow() -Original Message- From: pythondotnet-bounces+btribble=maxis@python.org [mailto:pythondotnet-bounces+btribble=maxis@python.org] On Behalf Of Alexander Mail Sent

[Python.NET] Problem importing .pyd modules after 'import clr'

2009-08-14 Thread Tribble, Brett
Just what it says. If I import the clr first, I can't import other pyd files. I assume this is because of the way that pythonnet intercepts the import statement to do it's magic. Now here is where it gets "fun": This problem occurs when running from the version of Python 2.5 that is native to Ma

Re: [Python.NET] using c# method from python

2010-02-18 Thread Tribble, Brett
Depending on how you're code works in C#, the way you access it from Python may vary, but the basic approach is: Compile your code as a .dll assembly, then from Python do: import clr # Imports the pythonnet clr stuff clr.AddReference("myAssembly.dll") myObjectHandle = myAssembly.myClass() myObj

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

2010-12-08 Thread Tribble, Brett
Your long self-conversation is the most interesting thing to happen to this list in a long time... From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Laszlo Sebo Sent: Wednesday, December 08, 2010 5:45 PM To: pythondotnet@

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

2010-12-09 Thread Tribble, Brett
Maya works fine with python.net. We use it all the time. Just remember that Maya is very particular as to how it handles multithreading, raising events, and the like. There is some info in the Maya Python SDK regarding how to deal with Python threading and Maya, and it seems to work with .NET ca

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

2010-12-13 Thread Tribble, Brett
I'm not a huge GIT lover, but it seems to have the most inertia behind it right now, so that would be my preference should the change be made... -Original Message- From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of

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

2011-01-07 Thread Tribble, Brett
Merge away! From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Barton Sent: Friday, January 07, 2011 1:02 AM To: Oleksii Bidiuk Cc: pythondotnet@python.org Subject: Re: [Python.NET] Fwd: PythonNET 2.0 Alpha2 and .NET 4.0 I'

Re: [Python.NET] PythonDotNet - IronPyton

2011-01-10 Thread Tribble, Brett
There are also logistical and political considerations. Some environments are tied to cpython, and switching to IronPython is impossible (such as the python environment included with Autodesk Maya). Also, many engineers have religious leanings, and would never tie their environment to .NET or ot

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

2011-01-18 Thread Tribble, Brett
Thanks Biduik, I will need this in a few short weeks. From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Oleksii Bidiuk Sent: Monday, January 17, 2011 8:06 AM To: pythondotnet@python.org Subject: [Python.NET] Python.NET an

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

2011-02-08 Thread Tribble, Brett
Has anyone been able to get this working on Windows 7 as 64 bit “all the way down”? I’m about to have this thrown on my plate I think… From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Oleksii Bidiuk Sent: Tuesday, Februa

Re: [Python.NET] Setting PYTHONPATH from code

2011-02-23 Thread Tribble, Brett
This is the code I use all the time to append a dir to the system path and then load assemblies from that dir. (note, they’re not in the GAC {woot!}) if os.path.isfile(myFile): if not myDir in sys.path: sys.path.insert(0, myDir) clr.AddReference("myAssembly") myFile is the name o

Re: [Python.NET] Fwd: Python.NET activity

2011-03-23 Thread Tribble, Brett
In other interesting/awesome Python news, the Python IDE stuff for Visual Studio 2010 that comes with the new version of IronPython has been split off into its own project. http://pytools.codeplex.com/ I haven't tried debugging pythonnet with it yet though. From: pythondotnet-bounces+btribb

Re: [Python.NET] Using numpy/matplotlib - DLL Load Failed

2011-04-19 Thread Tribble, Brett
Import multiarray first as well. Numpy is doing an import in the __init__ according to what I see here, unless I'm wrong, which is also likely. Lather, rinse, repeat for any additional modules that fail to load. This bug has plagued my pythondotnet usage since day 1... -Original Message---

Re: [Python.NET] Using numpy/matplotlib - DLL Load Failed

2011-04-20 Thread Tribble, Brett
_check import * File "c:\python27\lib\site-packages\numpy\lib\type_check.py", line 8, in import numpy.core.numeric as _nx File "c:\python27\lib\site-packages\numpy\core\__init__.py", line 5, in import multiarray ImportError: DLL load failed: The specified module co

Re: [Python.NET] Better doc strings.

2011-04-25 Thread Tribble, Brett
Well done sir! -Original Message- From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Barton Sent: Saturday, April 23, 2011 4:05 PM To: Brad Byrd Cc: pythondotnet@python.org Subject: Re: [Python.NET] Better doc string

Re: [Python.NET] Fedora FC15

2011-08-15 Thread Tribble, Brett
Pythono? -Original Message- From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Barton Sent: Sunday, August 14, 2011 3:51 PM To: 'pythondotnet@python.org' Subject: [Python.NET] Fedora FC15 I've rebuilt Christians wor

[Python.NET] Python Tools For Visual Studio

2011-12-02 Thread Tribble, Brett
If you haven't checked it out, you really should. It lets you write both CPython and IronPython in Visual Studio and you can debug both. It does a pretty good job of dependency and usage tracking so that things like "find all references" and "go to definition" work pretty well, and it even lets

Re: [Python.NET] import clr_2, import clr_4 vs import clr

2012-03-22 Thread Tribble, Brett
might any of this help? http://stackoverflow.com/questions/2455654/what-additional-configuration-is-necessary-to-reference-a-net-2-0-mixed-mode http://stackoverflow.com/questions/3267491/when-linking-a-net-2-0-managed-assembly-from-a-net-4-0-application-which-fram see the answer by “htw” http

Re: [Python.NET] import clr_2, import clr_4 vs import clr

2012-03-22 Thread Tribble, Brett
I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of

Re: [Python.NET] import clr_2, import clr_4 vs import clr

2012-03-23 Thread Tribble, Brett
March 23, 2012 10:18 AM To: pythondotnet@python.org Cc: Tribble, Brett Subject: RE: import clr_2, import clr_4 vs import clr Opening up our existing products native lib output to mixed mode proved to be a real pain, so I took your first suggestion Brett. After changing the project to .NET 4.0, chan

Re: [Python.NET] Struggling with a library

2012-03-27 Thread Tribble, Brett
Do you have the same versions of .NET installed on both machines? From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Juanma Belda Sent: Tuesday, March 27, 2012 8:52 AM To: pythondotnet@python.org Subject: [Python.NET] Strug

Re: [Python.NET] Struggling with a library

2012-03-29 Thread Tribble, Brett
.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers. Kind regards 2012/3/27 Tribble, Brett mailto:btrib...@ea.com>> Go to Windows Update and make sure that all versions of .NET are installed. From: Juanma Belda [mailto:jmbeldal...@gmail.com<mailto:jmbeldal.

Re: [Python.NET] DataGridView Issue

2012-06-28 Thread Tribble, Brett
Can Person derive from System.Collections.Arraylist instead of a System.Object? http://msdn.microsoft.com/en-us/library/system.collections.arraylist(v=vs.71).aspx From: pythondotnet-bounces+btribble=ea@python.org [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Manfred

Re: [Python.NET] Problem to use a dll: System.ApplicationException: Error 1: OpenDevice: Invalid handle

2013-01-15 Thread Tribble, Brett
I assume you don't have the source to the .dll? If you do, you can add a line to use debug the error using System.Diagnostics.Debugger.Break(): http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.break.aspx From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python

Re: [Python.NET] Problem to use a dll: System.ApplicationException: Error 1: OpenDevice: Invalid handle

2013-01-16 Thread Tribble, Brett
27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\setu ptools-0.6c11-py2.7.egg-info', 'C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\', 'C:\\Users\\mdk\\workspace\\camera\\'] Traceback

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

2013-01-22 Thread Tribble, Brett
Did you try: from System.Windows.Media.Imaging import BitmapSource bitmapsrc = BitmapSource() # <- set to an instance of type BitmapSource, not the class. cam.GetImage(bitmapsrc, timeout) If you need to pass it a variable that is of type BitmapSource, but which is set to null, then you might

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

2013-01-23 Thread Tribble, Brett
My personal solution would be to wrap the camera code in a very thin assembly that manages this stuff and provides a clean interface for python.net to hook into. I'm lazy that way though... From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Daniel Krause Se

Re: [Python.NET] How to pass a Type to a method?

2013-01-24 Thread Tribble, Brett
I don't think the python.net clr module supports most of the methods etc. that the IronPython one does: http://nullege.com/codes/search/clr Can you use the following instead? import System ... ... array = Array.CreateInstance(System.Int32, rows, columns) From: PythonDotNet [mailto:pythondotne

Re: [Python.NET] Python 3 version of Python for .NET

2013-02-26 Thread Tribble, Brett
This is crazy talk! From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Tony Roberts Sent: Tuesday, February 26, 2013 3:31 AM To: pythondotnet@python.org Subject: [Python.NET] Python 3 version of Python for .NET Hi, I've made the necessary changes to the Pyt

Re: [Python.NET] Python 3 version of Python for .NET

2013-02-28 Thread Tribble, Brett
Barton is probably the one to help you out. He'll likely respond shortly. From: Tony Roberts [mailto:t...@pyxll.com] Sent: Thursday, February 28, 2013 7:24 AM To: Tribble, Brett Cc: pythondotnet@python.org Subject: Re: [Python.NET] Python 3 version of Python for .NET Hi, I've buil

Re: [Python.NET] C# dynamic object support / Easy calling from C#

2013-07-05 Thread Tribble, Brett
Star Trek jokes, yeah, heard those... From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Mark Tigges Sent: Friday, July 05, 2013 7:49 AM To: Patrick Stewart Cc: pythondotnet@python.org Subject: Re: [Python.NET] C# dynamic object support / Easy calling from C#

Re: [Python.NET] debugging

2013-07-22 Thread Tribble, Brett
I would love to hear some good answers to this. I've been able to use PTVS/Visual Studio to debug either python or .NET, but trying to cross the bridge between the two leaves you debugging pythondotnet, and not the .NET project you actually want to debug. From: PythonDotNet [mailto:pythondotnet

Re: [Python.NET] debugging

2013-07-22 Thread Tribble, Brett
dless. From: Bradley Friedman [mailto:b...@fie.us] Sent: Monday, July 22, 2013 1:39 PM To: Tribble, Brett Cc: Jason Sachs; pythondotnet@python.org Subject: Re: [Python.NET] debugging I'm intrigued by this Brett. Is it that all the .NET Reflection gets in the way? I could certainly see that

Re: [Python.NET] debugging

2013-07-22 Thread Tribble, Brett
Yeah, I need to upgrade to the 2.0 beta. It's nice to see that pythondotnet has PTVS devs watching it. PTVS is one of the cooler things to come out of Microsoft! From: Bradley Friedman [mailto:b...@fie.us] Sent: Monday, July 22, 2013 2:10 PM To: Tribble, Brett Cc: Jason Sachs; pythond

Re: [Python.NET] C# path for 3rd-party libraries?

2013-07-23 Thread Tribble, Brett
I think you can register them in the GAC as well, but this is a pain in the butt to maintain. http://en.wikipedia.org/wiki/Global_Assembly_Cache From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Jason Sachs Sent: Tuesday, July 23, 2013 2:06 PM To: pythondo

Re: [Python.NET] ImportError: dynamic module does not define init function (PyInit_CLR)

2013-08-20 Thread Tribble, Brett
Python for .NET is in a superpositional state in which it is both working and not working. You just collapsed its wave function prematurely. Also you didn't which is why we're also not having this conversation. Addressing the question not clearly at hand, support for Python 3.x is pretty green

Re: [Python.NET] Moving the project to github

2013-11-12 Thread Tribble, Brett
I'm all for having it reside wherever it is easiest to continue development! From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of John Gill Sent: Tuesday, November 12, 2013 5:29 AM To: pythondotnet@python.org Subject: [Python.NET] Moving the project to github

Re: [Python.NET] PTVS and python.NET

2013-11-26 Thread Tribble, Brett
So, who is willing to be the primary maintainer of the github repository? I think we should wait for a little while to see if Brian or Barton respond. I see that tiran has a github account as well: https://github.com/tiran From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.or

Re: [Python.NET] github migration DONE

2014-01-31 Thread Tribble, Brett
Yes! So glad to see this happen. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Kyle Rocha Sent: Friday, January 31, 2014 6:43 PM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] github migration DONE This is great work.

Re: [Python.NET] Passing in null as the value for a nullable type.

2014-02-05 Thread Tribble, Brett
I believe you want to import System and pass System.Null. I can't remember if I've done this, but I think so. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of John Gill Sent: Wednesday, February 05, 2014 8:47 AM To: pythondotnet@python.org Subject: [Python

Re: [Python.NET] WPF and XAML

2014-04-28 Thread Tribble, Brett
I'm sure I've interacted with WPF apps written in C# from python.net. I don't think I've tried to write one from scratch. I know that I had trouble trying to get Iron Python UI code working in python.net because of how I.P. uses attributes to do some of the UI markup, and this did not come throu

Re: [Python.NET] homebrew pythonnet, versus pip install --pre pythonnet

2014-06-03 Thread Tribble, Brett
It has been a while since I've had to deal with this, but make sure that your assembly is in the system path and/or pythonpath if it is not registered in the GAC. From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Adam Klein Sent: Tuesday, June 03, 2014 4:0

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

2015-06-15 Thread Tribble, Brett
Adam, I’m ecstatic that there’s a player out there who is making good use of Python.net, and who would like to help contribute. Organizational and logistical issues aside, I’m all for anything you can throw at the project! Someone correct me if I’m wrong, but I believe Brian Lloyd has largely yi

Re: [Python.NET] pythonnet 2.1.0.dev1 released

2015-06-26 Thread Tribble, Brett
Wow, awesome! From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea@python.org] On Behalf Of Tony Roberts Sent: Friday, June 26, 2015 7:39 AM To: pythondotnet@python.org Subject: [Python.NET] pythonnet 2.1.0.dev1 released Hi, I've merged the changes from the renshawbay/pythonnet fork