[IronPython] Newbie mono question (setting up lib path)

Tim Riley riltim at gmail.com
Mon Jan 16 22:54:25 CET 2006


This works for me using Mono 1.1.13 and IronPython 1.0.2190 on Windows XP.


IronPython 1.0.2190 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>> sys.path.append('c:\Python24\Lib')
>>> import string
>>> dir(string)
['ImportError', 'KeyError', 'Template', 'True', 'TypeError', 'ValueError',
'_TemplateMetaclass', '__
builtins__', '__dict__', '__doc__', '__file__', '__name__', '_float',
'_idmap', '_idmapL', '_int', '
_long', '_multimap', '_re', 'ascii_letters', 'ascii_lowercase',
'ascii_uppercase', 'atof', 'atof_err
or', 'atoi', 'atoi_error', 'atol', 'atol_error', 'basestring', 'capitalize',
'capwords', 'center', '
chr', 'count', 'digits', 'expandtabs', 'find', 'float', 'hexdigits',
'index', 'index_error', 'int',
'isinstance', 'join', 'joinfields', 'len', 'letters', 'ljust', 'long',
'lower', 'lowercase', 'lstrip
', 'maketrans', 'map', 'octdigits', 'ord', 'printable', 'punctuation',
'range', 'replace', 'repr', '
rfind', 'rindex', 'rjust', 'rsplit', 'rstrip', 'split', 'splitfields',
'str', 'strip', 'super', 'swa
pcase', 'translate', 'type', 'upper', 'uppercase', 'whitespace', 'xrange',
'zfill']
>>>

On 1/16/06, m h <sesquile at gmail.com> wrote:
>
> hmmmm, string.py is in "\\tmp\\ipython\\IronPython-1.0-Beta1\\Lib"....
> which is in my path...
>
> mharrison[1080] mono IronPythonConsole.exe
> IronPython 1.0.2190 (Beta) on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> import string
> Traceback (most recent call last):
> ImportError: No module named string
> >>> import sys
> >>> sys.path
> ['\\tmp\\ipython\\IronPython-1.0-Beta1',
> '\\tmp\\ipython\\IronPython-1.0-Beta1\\Lib']
> >>>
>
>
>
> On 1/14/06, Martin Maly <Martin.Maly at microsoft.com> wrote:
> > this sounds like IronPython couldn't find the string module. try:
> >
> > >>> import sys
> > >>> sys.path
> >
> > and make sure it found its way there correctly. If in doubt, try
> absolute paths.
> >
> > Hopefully this helps
> > Martin
> >
> > ________________________________________
> > From: users-bounces at lists.ironpython.com On Behalf Of m h
> > Sent: Friday, January 13, 2006 6:00 PM
> > To: users at lists.ironpython.com
> > Subject: [IronPython] Newbie mono question (setting up lib path)
> >
> > Folks, I'm new to IronPython (and Mono!).
> > Following what I read in Jim's recent email, I tried copying my
> > python2.3 lib directory into the "Lib" directory and added "Lib" to
> > the sys.path in Lib/site.py.  Then I tried to import string but it
> > failed.  Any hints?
> >
> > mharrison[1080] mono IronPythonConsole.exe
> > IronPython 1.0.2190 (Beta) on .NET 2.0.50727.42
> > Copyright (c) Microsoft Corporation. All rights reserved.
> > >>> import string
> > Traceback (most recent call last):
> > ImportError: No module named string
> > >>>
> >
> > mharrison[1045] mono --version
> > Mono JIT compiler version 1.1.13, (C) 2002-2005 Novell, Inc and
> > Contributors. www.mono-project.com
> >         TLS:           normal
> >         GC:            Included Boehm (with typed GC)
> >         SIGSEGV      : normal
> >
> > thanks
> > matt
> > _______________________________________________
> > users mailing list
> > users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> > _______________________________________________
> > users mailing list
> > users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060116/440ea5bd/attachment.html>


More information about the Ironpython-users mailing list