Vernon Cole wrote:
But... time is already in the IronPython standard library -- no
special path stuff is needed...
He is embedding IronPython into another application and not using ipy.exe.
Michael
C:\Users\vernon>"c:\program files\Ironpython 2.0\ipy.exe"
IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.sleep(3)
>>>
--
Vernon Cole
On Sat, Jan 31, 2009 at 12:35 PM, Michael Foord
<[email protected] <mailto:[email protected]>> wrote:
António Piteira wrote:
Hello Michael,
Thank you for your reply.
I've done sys.path.append("c:\CPython26\lib")... shouldn't
this work?
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.
All the best,
Michael
----------------------------------------------------------------------------
----------------------
Hello Antonio,
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.
All the best,
Michael Foord
António Piteira wrote:
*http://www.wtvision.com/Mail/2007/logo_wTVision.gif*
<http://www.wtvision.com/>**
*www.wtvision.com <http://www.wtvision.com>
<http://www.wtvision.com>**
Tel: +351 21 831 06 86
Fax: +351 21 831 06 81
email: **[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>***
*Estúdios Grupo TV
<http://maps.google.com/maps?f=d&hl=en&geocode=2727134586203630395,38.937584
<http://maps.google.com/maps?f=d&hl=en&geocode=2727134586203630395,38.937584>
,-9.230719&saddr=Unknown+road+%4038.937584,+-9.230719&daddr=&mra=mr&sll=38.9
35778,-9.226456&sspn=0.033849,0.080338&ie=UTF8&ll=38.935778,-9.226456&spn=0.
033849,0.080338&t=h&z=14>
Travessa da Fonte de Cima, nº 2
Asseiceira Grande
2665 **–618 Venda do Pinheiro** *
* *
* *
* *
Hi,
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".
I have IronPython hosted in an application and I've
already tried to append python libs path too.
Any ideas?!
* *
* *
**
* *
*António Piteira**
Project Development
Director
email: [email protected]
<mailto:[email protected]>
<mailto:[email protected]
<mailto:[email protected]>>
mobile: +351 93 449 19 74 *
------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com