[IronPython] Newbie question about 'import'

Martin Maly Martin.Maly at microsoft.com
Sat Jan 7 08:59:14 CET 2006

Hi Fabio,

The tutorial is meant to be ran from the Tutorial directory (there are 2 batch files to execute the IronPythonConsole from there)
Other option is to add the Tutorial directory to your sys.path:

>>> import sys
>>> sys.path.append(sys.prefix + "\\Tutorial")
>>> import first

Since the tutorial is designed to work from the tutorial directory, I'd recommend using the batch files to start the console. This way, IronPython will run in the correct directory and import lookup paths will be set correctly.



From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Fabio
Sent: Friday, January 06, 2006 11:43 PM
To: IronPython
Subject: [IronPython] Newbie question about 'import'

I'm new in python (and IronPython).

I have used the tutorial of IronPython 1.0 Beta, and when I "import first" I receive this error:

>>> import first
Traceback (most recent call last):
  File , line 0, in input##0
ImportError: No module named first

I think what I need set some like import "Tutorial\first" but I know not the syntax...

Someone can help?

PS: How I do to in console get help about any command?

Thanks for all!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060106/d30b86ee/attachment.html>

More information about the Ironpython-users mailing list