[Tutor] filtering within a function.

Michael P. Reilly arcege@shore.net
Tue, 13 Mar 2001 07:08:59 -0500 (EST)


[Charset iso-8859-1 unsupported, filtering to ASCII...]
> On 12 Mar 2001, D-Man replied:
> > Maybe.  Are you using some interesting locales or something?
> >
> > Here:
> >
> > Python 2.0 (#18, Oct 31 2000, 13:55:49) [C] on sunos5
> > Type "copyright", "credits" or "license" for more information.
> > >>> import string
> > >>> len( string.uppercase )
> > 26
> > >>> print string.uppercase
> > ABCDEFGHIJKLMNOPQRSTUVWXYZ
> > >>>
> 
> Hmmm...
> 
> Python 2.0 (#1, Oct 16 2000, 18:10:03) 
> [GCC 2.95.2 19991024 (release)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import string, sys
> >>> len(string.uppercase)
> 56
> >>> print string.uppercase
> ABCDEFGHIJKLMNOPQRSTUVWXYZ______________________________
> >>> sys.path
> ['', '/mnt/usr/local/lib/python2.0',
> '/mnt/usr/local/lib/python2.0/plat-linux2',
> '/mnt/usr/local/lib/python2.0/lib-tk',
> '/mnt/usr/local/lib/python2.0/lib-dynload',
> '/mnt/usr/local/lib/python2.0/site-packages',
> '/mnt/usr/local/lib/python2.0/site-packages/PIL']
> >>> 
> 
> 
> Python 1.5.2 (#1, Aug 25 2000, 09:33:37)  
> [GCC 2.96 20000731 (experimental)] on linux-i386
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import string, sys
> >>> len(string.uppercase
> ... )
> 56
> >>> print string.uppercase
> ABCDEFGHIJKLMNOPQRSTUVWXYZ______________________________
> >>> sys.path
> ['', '/usr/lib/python1.5/',
> '/usr/lib/python1.5/plat-linux-i386', 
> '/usr/lib/python1.5/lib-tk',
> '/usr/lib/python1.5/lib-dynload',
> '/usr/lib/python1.5/site-packages']

The first element in the path is important.. what is the file being
imported?

>>> print string.__file__
??

It could be from a more local file.

  -Arcege

-- 
------------------------------------------------------------------------
| Michael P. Reilly, Release Manager  | Email: arcege@shore.net        |
| Salem, Mass. USA  01970             |                                |
------------------------------------------------------------------------