Hi!
Can someone tell me how to set PYTHONPATH variable in code when working with Python.Runtime.dll without changing the value in the system variables before.
Thanks
SHARON
________________________________
PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any …
[View More]review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).
[View Less]
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 the assembly… even in reflection mode. Which I think is correct.
the handler begins at line 88.
it was throwing an exception when it tries to "ScanAssembly()" on the passed assembly. More …
[View More]specifically when it tried to load the types.
If I'm reading the code right, it should not attempt to scan the assembly because it is loaded reflection only. One can check this with the "ReflectionOnly" property of the provided assembly. So I surrounded the rest of the code in a "if" conditional and only add the assembly and scan it, if it is not "RefelctionOnly."
Is that the right thing to do? It's gotten rid of my problem. But I wonder if its strictly correct to both not add it to the assemblies collection in the manager and also not scan it.
Thoughts? I don't want to submit a patch if it's not really the right approach to the matter.
[View Less]
Hello,
I'm new to .NET and just trying to make available a few .NET dll files for
an application I would *like* to build in CPython. I'm trying to use
pythonnet for the task as I would prefer not to use IronPython. I have
Python 2.7 installed on a 64bit Windows 7 PC.
I have managed to get the latest svn version, confirmed required changes
according to:
http://blog.bidiuk.com/2011/01/python-net-and-vs2010-net-4/
were made. Though, it seemed most were no longer necessary in the latest
SVN …
[View More]version.
I also changed the Conditional Compilation symbols to: PYTHON27,UCS2 under
the Python.Runtime, Properties->Build tab.
I rebuilt the entire solution, and all compiled with no errors.
However, I get the following when I try to run Python.exe:
PS G:\svn\Python\pythonnet\trunk\pythonnet\src\console\bin\Debug>
.\python.exe
ImportError: No module named site
PS G:\svn\Python\pythonnet\trunk\pythonnet\src\console\bin\Debug>
Does anyone have experience building pythonnet for Python 2.7 and .NET 4?
Thank you in advance,
john
[View Less]
Hi,
I'm using my own python .NET 4.0 build and I'm trying to access some extension methods for a concurrent queue.
However, the console only shows methods and not extension methods. In visual studio 2010 C# .NET 4.0, I can see all the extension methods in the Intellisense/Autocomplete options.
More specifically, I'm doing this following.
import clr4
import System
from System import *
from System.Collections.Generic import *
from System.Collections.Concurrent import *
q1 = System.Collections.…
[View More]Concurrent.ConcurrentQueue[System.Double]()
# Attempting to get this extension method's return value.
# in CSharp I would just call this extension method to get the last item's value
# without dequeueing it.
val = q1.Last()
# but the python console tells me the object has no attribute 'Last'
Is this a known limitation, or is it something specific in how they must be called?
This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.
[View Less]