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'
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
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
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,
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
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
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
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@
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
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
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'
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
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
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
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
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
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---
_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
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
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
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
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
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
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
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
.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.
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
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
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
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
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
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
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
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
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#
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
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
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
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
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
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
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
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.
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
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
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
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
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
48 matches
Mail list logo