Re: [Ironpython-users] Setting __name__ to __main__

2011-11-24 Thread Markus Schaber
Hi, First, Sorry to all users which I mailed personally, this was not intentional. It seems that, even after several years of being forced to use it, Outlook and me are still not compatible. :-( Von: Markus Schaber > I want to set the __name__ variable to "__main__" in the script I execute.

Re: [Ironpython-users] Setting __name__ to __main__

2011-11-23 Thread Dino Viehland
org Subject: Re: [Ironpython-users] Setting __name__ to __main__ Perhaps this is what you are thinking of: PythonEngine engine = new PythonEngine(pyEngineOptions); engine.DefaultModule = engine.CreateModule("__main__", true); From: http://ironpython.codeplex.com/workitem/2537 -Doug

Re: [Ironpython-users] Setting __name__ to __main__

2011-11-23 Thread Doug Blank
ink there's a ModuleOptions flag which controls it but don't remember > how to flow it in off the top of my head > > From: Jeff Hardy > Sent: 11/23/2011 7:31 AM > To: Markus Schaber > Cc: [email protected] > Subject: Re: [Ir

Re: [Ironpython-users] Setting __name__ to __main__

2011-11-23 Thread Dino Viehland
I think there's a ModuleOptions flag which controls it but don't remember how to flow it in off the top of my head From: Jeff Hardy Sent: 11/23/2011 7:31 AM To: Markus Schaber Cc: [email protected] Subject: Re: [Ironpython-users] Setting _

Re: [Ironpython-users] Setting __name__ to __main__

2011-11-23 Thread Jeff Hardy
Your best bet is to look at the source to ipy.exe, which has to do the same thing. - Jeff On Mon, Nov 21, 2011 at 9:21 AM, Markus Schaber wrote: > Hi, > > I want to set the __name__ variable to "__main__" in the script I execute. > However, it seems that the __name__ variable always is overridd

[Ironpython-users] Setting __name__ to __main__

2011-11-21 Thread Markus Schaber
Hi, I want to set the __name__ variable to "__main__" in the script I execute. However, it seems that the __name__ variable always is overridden with the filename of the executed file. The attached example program gives the output "name: test" instead of "name: __main__". Googling brought up