Oh, I see my mistake now. My reasoning about when strings are expanded was faulty and when writing the example in C#, I didn&#39;t notice the option to not expand environment strings. <div><br></div><div>Having said that, I&#39;m still looking for a guideline about what to do in the scenario where the behaviour of IronPython is more &#39;correct&#39; than CPython.<div>
<br></div><div>Richard<br><div><div><div><br><div class="gmail_quote">On Sun, Jan 16, 2011 at 8:35 PM, Steve Dower <span dir="ltr">&lt;<a href="mailto:s.j.dower@gmail.com">s.j.dower@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Going by the Windows documentation, I would expect REG_EXPAND_SZ to<br>
_optionally_ expand when retrieving the value, but never expand when<br>
setting it.<br>
<br>
The main set of Windows functions don&#39;t expand the value - the type is<br>
only an indicator that it may contain environment variables. That<br>
said, the only reason you wouldn&#39;t expand it is if you need the value<br>
to be portable to another user/system (%APPDATA% comes to mind here),<br>
so it makes sense for things to be simplified here by default (IIRC<br>
there is one Win32 function that will expand it, probably exposed by<br>
the shell rather than the kernel).<br>
<br>
Of course, without an option to switch behaviour, you are guaranteed<br>
to upset somebody. &lt;/IMHO&gt;<br>
<div><div></div><div class="h5"><br>
On Mon, Jan 17, 2011 at 05:33, Richard Nienaber &lt;<a href="mailto:rjnienaber@gmail.com">rjnienaber@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Hmmm... it is still probably worth filing an issue with CPython:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://bugs.python.org/" target="_blank">http://bugs.python.org/</a><br>
&gt;<br>
&gt; Will do.<br>
&gt; On Sun, Jan 16, 2011 at 5:29 PM, Michael Foord &lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 16/01/2011 09:23, Richard Nienaber wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve closed the following issues:<br>
&gt;&gt; test blocking: support setting field of value type when calling ctor<br>
&gt;&gt; keyword argument is also treated as args for params array<br>
&gt;&gt; unable to invoke delegate object with method which takes ref args<br>
&gt;&gt; binder does not handle argument list with keyword and tuple correctly for<br>
&gt;&gt; .net methods<br>
&gt;&gt; tracking: wrong message when calling System.Activator.CreateInstance(None)<br>
&gt;&gt; clr.AddReference need invalidate the cached rules related to<br>
&gt;&gt; NamespaceTracker<br>
&gt;&gt; Questions:<br>
&gt;&gt;<br>
&gt;&gt; Incompatibility between CPy and IPy in the way REG_EXPAND_SZ works in<br>
&gt;&gt; _winreg module.<br>
&gt;&gt;<br>
&gt;&gt; It seems to me that in this case that IronPython was doing the right<br>
&gt;&gt; thing, and CPython was doing the wrong thing. REG_EXPAND_SZ seems to mean<br>
&gt;&gt; that environment variables should be expanded when the value is inserted<br>
&gt;&gt; into the registry. I&#39;ve assumed here that even if CPython does the wrong<br>
&gt;&gt; thing, IronPython should follow the behaviour of CPython (and closed the<br>
&gt;&gt; issue).<br>
&gt;&gt;<br>
&gt;&gt; Hmmm... it is still probably worth filing an issue with CPython:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://bugs.python.org/" target="_blank">http://bugs.python.org/</a><br>
&gt;&gt;<br>
&gt;&gt; All the best,<br>
&gt;&gt;<br>
&gt;&gt; Michael<br>
&gt;&gt;<br>
&gt;&gt; Code has recently been added to fix this issue: types in assemblies loaded<br>
&gt;&gt; with .AddReferenceToFileAndPath() are not importable if they reference other<br>
&gt;&gt; assemblies<br>
&gt;&gt;<br>
&gt;&gt; Should I close this one as well or does this need to make it into a build<br>
&gt;&gt; first?<br>
&gt;&gt;<br>
&gt;&gt; -X:PreferComDispatch<br>
&gt;&gt;<br>
&gt;&gt; I have come across quite a few issues where there are inconsistencies when<br>
&gt;&gt; IronPython is started with/without the &#39;-X:PreferComDispatch&#39; switch (like<br>
&gt;&gt; this one). If I look at the IronPython console help this switch is absent<br>
&gt;&gt; and attempting to run it gives me the error &#39;File -X:PreferComDispatch does<br>
&gt;&gt; not exist.&#39;. Is this option no longer available/supported? If not, what<br>
&gt;&gt; should be done with these issues?<br>
&gt;&gt;<br>
&gt;&gt; Richard<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
&gt;&gt; <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; <a href="http://www.voidspace.org.uk/" target="_blank">http://www.voidspace.org.uk/</a><br>
&gt;&gt;<br>
&gt;&gt; May you do good and not evil<br>
&gt;&gt; May you find forgiveness for yourself and forgive others<br>
&gt;&gt; May you share freely, never taking more than you give.<br>
&gt;&gt; -- the sqlite blessing <a href="http://www.sqlite.org/different.html" target="_blank">http://www.sqlite.org/different.html</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
&gt; <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br></div></div></div></div></div>