from... import...

Paddy paddy3118 at netscape.net
Fri Feb 2 23:46:08 EST 2007


On Feb 3, 4:12 am, fatwallet... at yahoo.com wrote:
> what's the from ... import keyword use for?
> for example - from contenttype import getContentType
>
> import os
> import sys
> import getopt
> import types
> import re
> import pprint
> import logging
> from contenttype import getContentType
>
> In Java what kind of statement is similar this?
>
> thanks

Try:
  http://diveintopython.org/object_oriented_framework/
importing_modules.html
  http://www.python.org/doc/current/tut/
node8.html#SECTION008100000000000000000

And more generally maybe:
  http://www.ferg.org/projects/python_java_side-by-side.html
  http://dirtsimple.org/2004/12/python-is-not-java.html

Happy coding - Paddy.






More information about the Python-list mailing list