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]
Thank you very much!
It will be helpful for us to know which platform (Windows [Mono or .NET]
vs Linux) where this is happening.
On 05/17/11 10:52, SourceForge.net wrote:
> Bugs item #3303462, was opened at 2011-05-18 02:52
> Message generated for change (Tracker Item Submitted) made by christallire
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=823891&aid=3303462&group_…
>
> Please note that this message will contain a full …
[View More]copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: None
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: xeph (christallire)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Stack corruption
>
> Initial Comment:
> I'm using python.net heavily in my server/client project
>
> I found Stack buffer overflow exception OR stack corruption exception is caused when python script throws an exception, which is caught by CLR code especially when GC is collecting its own objects.
> I think this problem is caused when allocated objects are unwinded by CLR engine.
> (threw in CLR GC Collection/GC Security Cookie Check)
>
> I found problem this 2 months ago, been struggling to solve this problem, because it happens rarely, randomly when GC is collecting objects
> I solved this problem via removing all of pythonexception throwing code from PythonEngine, changed to return parameters to null
>
> Hope you have better solution for solve this problem :)
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=823891&aid=3303462&group_…
>
[View Less]
I am trying to put together a basic proof of concept for running some python on the CPython interpreter from a C# host application. I have successfully invoked the RunSimpleString method on the PythonEngine class as follows:
PythonEngine.Initialize();
IntPtr lockPtr = PythonEngine.AcquireLock();
var result = PythonEngine.RunSimpleString(@"print ""hello""");
PythonEngine.ReleaseLock(lockPtr);
PythonEngine.Shutdown();
This worked as expected and output hello to the command prompt.
I then …
[View More]wanted to make sure I could get a simple example working with RunString so tried the following
PythonEngine.Initialize();
IntPtr lockPtr = PythonEngine.AcquireLock();
var result = PythonEngine.RunString(@"print ""hello""
print ""test""
");
PythonEngine.ReleaseLock(lockPtr);
PythonEngine.Shutdown();
This just appears to do nothing and the returned result object is null. Am I getting the complete wrong end of the stick with how to use RunString?
My System is:
Windows 7 x64
Python 2.6.6 (64 bit)
The Python .net I downloaded was pythonnet-2.0-alpha2-136-py26.zip
My Visual Studio project is set to .Net 3.5
Thanks for your time,
Alan
[View Less]