Hi,

How to override the python's __file__ variables path (with a custom path rather 
than the current executing script path) in c#?
I want to do this before the python script execution through c#. I am using the 
following code snippet for overriding the __file__ variable.
Please let me know if this is the correct approach or not

ScriptScope scope2;
scope2.SetVariable("__file__", "c:/temp");


When we execute the python script this is being overwritten by python 
automatically (to current executing script path) and I am not able to get the 
c:/temp path from the __file__ variable.

Please help me resolve this issue.



Thanks & Regards,
Dasaratha R



Nothing in this message is intended to constitute an electronic signature 
unless a specific statement to the contrary is included in this message.

Confidentiality Note: This message is intended only for the person or entity to 
which it is addressed. It may contain confidential and/or privileged material. 
Any review, transmission, dissemination or other use, or taking of any action 
in reliance upon this message by persons or entities other than the intended 
recipient is prohibited and may be unlawful. If you received this message in 
error, please contact the sender and delete it from your computer.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to