Greg and everyone:<br><br>These days I am trying to make all of my programs super-portable -- CPython2.x, IronPython and Python3 on Windows and Linux.  2/3 of these use ONLY unicode strings.  One of my reasons for migrating to PyGUI is because there are no plans for wxPython to run on any platform other than 2.x.  I am guessing that PyGUI, being more simple, is going to be much easier to convert to the other compilers than its competition.<br>


<br>  What I am getting at is this advice from a very old programmer... try to make everything work correctly with unicode. It will make life much easier when conversion time comes around.  When you do need byte strings, use a user-written function to produce them, not a built in.  This is one that I have found useful:<br>


v v v v<br>def str2bytes(sval):<br>    if sys.version_info &lt; (3,0) and isinstance(sval, str):<br>        sval = sval.decode(&quot;latin1&quot;)<br>    return sval.encode(&quot;latin1&quot;)<br>^ ^ ^ ^<br> --<br>Vernon Cole<br>


<br><br><div class="gmail_quote">On Sat, Dec 19, 2009 at 8:04 PM, Greg Ewing <span dir="ltr">&lt;<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Dan Villiom Podlaski Christiansen wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m seeing a weird issue; for some  reason ‘Open as…’ and ‘Save as…’<br>
</blockquote>
&gt; create a menu item per character in their name.<br>
<br>
Sounds like it thinks they&#39;re menu item groups instead of<br>
single items.<br>
<br>
Are these perhaps unicode strings? In Generic/GMenus.py,<br>
Menu._make_item(), there&#39;s the following piece of code:<br>
<br>
  if isinstance(text, str):<br>
    return SingleMenuItem(text, cmd, substitutions)<br>
  else:<br>
    return MenuItemGroup(text, cmd)<br>
<br>
This could get confused if it&#39;s given a unicode string<br>
instead of a plain str. It should probably be amended to<br>
take unicode into account.<br><font color="#888888">
<br>
-- <br>
Greg<br>
_______________________________________________<br>
Pygui mailing list<br>
<a href="mailto:Pygui@python.org" target="_blank">Pygui@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pygui" target="_blank">http://mail.python.org/mailman/listinfo/pygui</a><br>
</font></blockquote></div><br>