But... time is already in the IronPython standard library -- no special path stuff is needed...<br><br>C:\Users\vernon&gt;&quot;c:\program files\Ironpython 2.0\ipy.exe&quot;<br>IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053<br>
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; import time<br>&gt;&gt;&gt; time.sleep(3)<br>&gt;&gt;&gt;<br>--<br>Vernon Cole<br><br><div class="gmail_quote">
On Sat, Jan 31, 2009 at 12:35 PM, Michael Foord <span dir="ltr">&lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</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;">
<div class="Ih2E3d">António Piteira wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Michael,<br>
<br>
Thank you for your reply.<br>
<br>
I&#39;ve done sys.path.append(&quot;c:\CPython26\lib&quot;)... shouldn&#39;t this work?<br>
 &nbsp;<br>
</blockquote>
<br></div>
I think you have solved your problem now - but for IronPython 2 you should be using the standard library for Python 2.5 and *not* the 2.6 one, and if you have strings with backslashes in them you must make them raw strings or use double backslashes.<br>

<br>
All the best,<br><font color="#888888">
<br>
Michael</font><div><div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
----------------------------------------------------------------------------<br>
----------------------<br>
<br>
Hello Antonio,<br>
<br>
I&#39;ve used the time module fine from IronPython 2 (you can confirm this by installing IP 2 from the msi installer). I suspect you have not correctly set sys.path for your hosted code. Print sys.path from inside the hosted environment and confirm that the directory containing the time module is there.<br>

<br>
All the best,<br>
<br>
Michael Foord<br>
<br>
António Piteira wrote:<br>
 &nbsp;<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
*<a href="http://www.wtvision.com/Mail/2007/logo_wTVision.gif*" target="_blank">http://www.wtvision.com/Mail/2007/logo_wTVision.gif*</a> &lt;<a href="http://www.wtvision.com/" target="_blank">http://www.wtvision.com/</a>&gt;**<br>

<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
<br>
*<a href="http://www.wtvision.com" target="_blank">www.wtvision.com</a> &lt;<a href="http://www.wtvision.com" target="_blank">http://www.wtvision.com</a>&gt;**<br>
Tel: +351 21 831 06 86<br>
Fax: +351 21 831 06 81<br>
email: **<a href="mailto:info@wtvision.com" target="_blank">info@wtvision.com</a> &lt;mailto:<a href="mailto:info@wtvision.com" target="_blank">info@wtvision.com</a>&gt;***<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
<br>
*Estúdios Grupo TV <br>
 &nbsp; &nbsp;<br>
</blockquote>
&lt;<a href="http://maps.google.com/maps?f=d&amp;hl=en&amp;geocode=2727134586203630395,38.937584" target="_blank">http://maps.google.com/maps?f=d&amp;hl=en&amp;geocode=2727134586203630395,38.937584</a><br>
,-9.230719&amp;saddr=Unknown+road+%4038.937584,+-9.230719&amp;daddr=&amp;mra=mr&amp;sll=38.9<br>
35778,-9.226456&amp;sspn=0.033849,0.080338&amp;ie=UTF8&amp;ll=38.935778,-9.226456&amp;spn=0.<br>
033849,0.080338&amp;t=h&amp;z=14&gt;<br>
<br>
 &nbsp;<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Travessa da Fonte de Cima, nº 2<br>
Asseiceira Grande<br>
2665 **–618 Venda do Pinheiro** *<br>
<br>
* *<br>
<br>
* *<br>
<br>
* *<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
<br>
Hi,<br>
<br>
In Ironpython 1.x I could easily import time and do stuff like time.sleep(x), but since I've changed to IronPython 2.0 I'm unable to do this. I always get "No module named time".<br>
<br>
I have IronPython hosted in an application and I've already tried to append python libs path too.<br>
<br>
Any ideas?!<br>
<br>
* *<br>
<br>
* *<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
<br>
**<br>
<br>
<br>
* *<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
<br>
*António Piteira**<br>
Project Development<br>
Director<br>
email: <a href="mailto:antonio.piteira@wtvision.com" target="_blank">antonio.piteira@wtvision.com</a> &lt;mailto:<a href="mailto:antonio.piteira@wtvision.com" target="_blank">antonio.piteira@wtvision.com</a>&gt;<br>
mobile: +351 93 449 19 74 *<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">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>
 &nbsp; &nbsp; &nbsp;<br>
</blockquote>
<br>
<br>
 &nbsp;<br>
</blockquote>
<br>
<br>
-- <br>
<a href="http://www.ironpythoninaction.com/" target="_blank">http://www.ironpythoninaction.com/</a><br>
<a href="http://www.voidspace.org.uk/blog" target="_blank">http://www.voidspace.org.uk/blog</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">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>