<html><head><style type="text/css" media="screen">Body{font-family: Verdana;font-size:.75em;}h4{font-size:.9em;}a{color: #3a62a6;}.digest .toc {margin-bottom: 15px; padding-bottom:8px; border-bottom: 1px solid #ccc;}.digest .tocItem {margin-bottom: 15px;}.tocItem a{color:#000;text-decoration: none;}.tocItem a:hover{color: #3a62a6;text-decoration: underline;}.topic{padding-bottom: 8px;margin-bottom: 20px; border-bottom: 1px solid #ccc;}.topicHeader{margin-bottom:10px;}.topicTitle{font-weight: bold;}.replies p{margin:0;padding:0;}.replies hr{width: 15%;text-align: left;margin: 0 auto 5px 0;border: none 0;border-top: 1px solid #ccc;height: 1px;}.reply{margin-bottom: 6px;padding-bottom: 4px;}.anchorMarker{color: #3a62a6;}.footer{color: gray;}</style></head><body><div class="digest"><p>Hi ironpython,</p><p>Here's your Daily Digest of new issues for project "<a href="http://ironpython.codeplex.com/">IronPython</a>".</p><p>In today's digest:</p><h4>ISSUES</h4><div class="toc"><div class="tocItem"><a href="#toc_issue_1">1. <span class="tocTitle">[New comment] struct doesn't support format string of type bytes</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_2">2. <span class="tocTitle">[New comment] Quoted IRONPYTHONPATH causes error with "import"</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_3">3. <span class="tocTitle">[New comment] Quoted IRONPYTHONPATH causes error with "import"</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_4">4. <span class="tocTitle">[New comment] System.Decimal string.format issue</span> <span class="anchorMarker">↓</span></a></div><div class="tocItem"><a href="#toc_issue_5">5. <span class="tocTitle">[New issue] io.StringIO always closed</span> <span class="anchorMarker">↓</span></a></div></div><h4>ISSUES</h4><div class="topic"><a name="toc_issue_1"></a><div class="topicHeader"><span class="topicTitle">1. [New comment] struct doesn't support format string of type bytes</span> <a href="http://ironpython.codeplex.com/workitem/34682">view online</a></div><p>User jbester1 has commented on the issue:</p><p>"<p>Can do - updated IAW comments</p><p>https://github.com/jbester/main/compare/IronLanguages:master...master</p><p></p>"</p></div><div class="topic"><a name="toc_issue_2"></a><div class="topicHeader"><span class="topicTitle">2. [New comment] Quoted IRONPYTHONPATH causes error with "import"</span> <a href="http://ironpython.codeplex.com/workitem/34687">view online</a></div><p>User peterSchwalm has commented on the issue:</p><p>"<p>Hello,<br>I am not sure if this is really a bug. IMHO quotes are only syntactic matter of the windows command line interpreter. They are used in .cmd- / .bat-files ore interactively and they serve as protection against splitting filenames containing spaces on a command line into multiple arguments. Normally command lines are splitted into arguments at space characters.</p><p>A program or script called by the command line</p><p>    c:&gt;progName my text.txt</p><p>would find ['progName', 'my', 'text.txt'] in sys.argv (or in how ever that would be named in a non-python language).</p><p>Surrounding the filename (my text.txt) with quotes as in</p><p>    c:&gt;progName &quot;my text.txt&quot;</p><p>simply prevents splitting between 'my' and 'text.txt'. So sys.argv would contain ['progName', 'my text.txt']. So during parsing the command line the quotes disappear and sys.argv will NOT contain ['progName', '&quot;my text.txt&quot;']</p><p>That means the filename itself and the internal presentation in the program does not contain the quotes.</p><p>The problem with the SET-command in cmd.exe is: the command line is not parsed as usually. Instead the<br>environment variable contains the rest of the line (except file redirection options). So after</p><p>    c:&gt;set x=a b c</p><p>the environment variable x contains 'a b c' and the protection against splitting is not necessary.</p><p>So I think the better solution would be: do not use quotes when assigning filenames to environment variables by the SET-command.</p><p>To strip already existing quotes from filenames in batch-files one can use the construct '%~0', '%~1' ... for batchparameters or '%%~f' in for loops. Unfortunately this does not work for environment variables. But one can misuse one-time-for-loops for this purpose.</p><p>For example after in a .bat-file</p><p>    set x=&quot;a b c&quot;</p><p>x contains '&quot;a b c&quot;'</p><p>To strip off the quotes one can write:</p><p>    for %%f in (%x%) set x=%%~f</p><p></p><p> </p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><br></p>"</p></div><div class="topic"><a name="toc_issue_3"></a><div class="topicHeader"><span class="topicTitle">3. [New comment] Quoted IRONPYTHONPATH causes error with "import"</span> <a href="http://ironpython.codeplex.com/workitem/34687">view online</a></div><p>User peterSchwalm has commented on the issue:</p><p>"<p>In my last comment I accidently &quot;saved&quot; to early.</p><p>The batch-file snippet is:</p><p>    set x=&quot;a b c&quot;<br>    set x<br>    rem x is '&quot;a b c&quot;'<br>    rem remove quotes<br>    for %%f in (%x%) do set x=%%~f<br>    set x<br>    rem x is 'a b c' now.</p><p>Sometimes cumbersome to handle. But I would prefer that to handling these batch-file oddities in ironPython. </p><p>Peter<br></p>"</p></div><div class="topic"><a name="toc_issue_4"></a><div class="topicHeader"><span class="topicTitle">4. [New comment] System.Decimal string.format issue</span> <a href="http://ironpython.codeplex.com/workitem/34710">view online</a></div><p>User vernondcole has commented on the issue:</p><p>"<p>Given that 'string'.format() is a function from the Python standard library, I would say that the chance of getting the worldwide Python community to embrace the extension you suggest for a foreign (dotNet) data type is practically nil -- especially since the option, converting to decimal.Decimal is both easy, and specially supported by the IronPython runtime for exactly this kind of situation.   Conversion to Double could loose precision, direct conversion will not.</p><p>&gt;&gt;&gt; from System import Decimal as SystemDecimal<br>&gt;&gt;&gt; import decimal<br>&gt;&gt;&gt; sd = SystemDecimal(1234567)<br>&gt;&gt;&gt; thousand = SystemDecimal(1000)<br>&gt;&gt;&gt; fract = sd / thousand<br>&gt;&gt;&gt; dd = decimal.Decimal(fract)<br>&gt;&gt;&gt; print('{:,.2f}'.format(dd))<br>1,234.57<br>&gt;&gt;&gt;</p><p>Works just exactly like you want.<br></p>"</p></div><div class="topic"><a name="toc_issue_5"></a><div class="topicHeader"><span class="topicTitle">5. [New issue] io.StringIO always closed</span> <a href="http://ironpython.codeplex.com/workitem/34713">view online</a></div><p>User paweljasinski has proposed the issue:</p><p>"<pre><code>c:\cygwin64\home\rejap>ipy
IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.18052 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> from io import StringIO
>>> s=StringIO()
>>> s.write('1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: write to closed file
>>> s=StringIO('1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: write to closed file
>>></code></pre>

"</p></div><div class="footer"><p>You are receiving this email because you subscribed to notifications on CodePlex.</p><p>To report a bug, request a feature, or add a comment, visit <a href="http://ironpython.codeplex.com/workitem/list/basic">IronPython Issue Tracker</a>. You can <a href="http://ironpython.codeplex.com/subscriptions/workitem/project/edit">unsubscribe or change your issue notification settings</a> on CodePlex.com.</p></div></div></body></html>