But... time is already in the IronPython standard library -- no special path stuff is needed...<br><br>C:\Users\vernon>"c:\program files\Ironpython 2.0\ipy.exe"<br>IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053<br>
Type "help", "copyright", "credits" or "license" for more information.<br>>>> import time<br>>>> time.sleep(3)<br>>>><br>--<br>Vernon Cole<br><br><div class="gmail_quote">
On Sat, Jan 31, 2009 at 12:35 PM, Michael Foord <span dir="ltr"><<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>></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've done sys.path.append("c:\CPython26\lib")... shouldn't this work?<br>
<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'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>
<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> <<a href="http://www.wtvision.com/" target="_blank">http://www.wtvision.com/</a>>**<br>
<br>
<br>
<br>
<br>
*<a href="http://www.wtvision.com" target="_blank">www.wtvision.com</a> <<a href="http://www.wtvision.com" target="_blank">http://www.wtvision.com</a>>**<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> <mailto:<a href="mailto:info@wtvision.com" target="_blank">info@wtvision.com</a>>***<br>
<br>
<br>
<br>
*Estúdios Grupo TV <br>
<br>
</blockquote>
<<a href="http://maps.google.com/maps?f=d&hl=en&geocode=2727134586203630395,38.937584" target="_blank">http://maps.google.com/maps?f=d&hl=en&geocode=2727134586203630395,38.937584</a><br>
,-9.230719&saddr=Unknown+road+%4038.937584,+-9.230719&daddr=&mra=mr&sll=38.9<br>
35778,-9.226456&sspn=0.033849,0.080338&ie=UTF8&ll=38.935778,-9.226456&spn=0.<br>
033849,0.080338&t=h&z=14><br>
<br>
<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>
<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>
<br>
<br>
**<br>
<br>
<br>
* *<br>
<br>
<br>
<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> <mailto:<a href="mailto:antonio.piteira@wtvision.com" target="_blank">antonio.piteira@wtvision.com</a>><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>
<br>
</blockquote>
<br>
<br>
<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>