Hi Chris,<br><br>That makes sense, and I don&#39;t know of any other way to fix language issues like that, but I would suggest that that call be moved somewhere else if possible. Like the python docs say, it seems inappropriate for a library to be setting the locale, and when you just do the import agversion/agversion.select() to e.g. use the IW classes to query or control the venue client, AG is effectively being used as a library. Could that call be moved to somewhere like when the GUI is set up? I&#39;m not familiar enough with the AG codebase to say, but it makes more sense to me to be somewhere like that rather than in the very high-level general code like Toolkit.py is.<br>

<br>--Andrew<br><br><div class="gmail_quote">2011/4/1 Christoph Willing <span dir="ltr">&lt;<a href="mailto:c.willing@uq.edu.au">c.willing@uq.edu.au</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
On 02/04/2011, at 6:04 AM, Andrew Ford wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
I noticed some interesting effects in a C++ application I&#39;m developing that calls various AG functions via the Python API. My app also uses wxWidgets, and when I was experimenting with its logging functions, I noticed that the timestamp format it uses changes after I call a standard import agversion and agversion.select(3). I looked a bit for any locale setting AG does and found locale.setlocale(locale.LC_ALL, &#39;C&#39;) in Toolkit.py. Commenting this line out prevents the timestamp (presumably the associated locale settings as well) from changing; I haven&#39;t tested whatever effect it may have on the venue client. I&#39;m curious as to what the rationale for this call is, as even the python docs (<a href="http://docs.python.org/library/locale.html" target="_blank">http://docs.python.org/library/locale.html</a>) say it is not necessarily a good idea to set this in a context like this (&quot;It is generally a bad idea to call setlocale() in some library routine, since as a side effect it affects the entire program.&quot;) Any input on this issue would be great.<br>


</blockquote>
<br>
<br></div>
Andrew,<br>
<br>
It was added so that non-english language users could use the toolkit. I believe the original issue was incorrect time stamping in the chat window but there was also some other side effect (which I can&#39;t recall right now) that was fixed by setting the locale.<br>


<br>
If there&#39;s a better way (than setting the locale like that) to fix the language issue then lets do it ...<br>
<br>
<br>
chris<br><font color="#888888">
<br>
<br>
Christoph Willing                       +61 7 3365 8316<br>
QCIF Access Grid Manager<br>
University of Queensland<br>
<br>
</font></blockquote></div><br>