NewBie question: cannot import TKinter and os

Steve Holden sholden at holdenweb.com
Wed Dec 20 08:39:58 EST 2000


Bill Anderson <anderson at boi.hp.com> wrote in message
news:3A368893.FDC9CAC7 at boi.hp.com...
> Martin von Loewis wrote:
> >
> > etsang at my-deja.com writes:
> >
> > > 1. at the very first beginning, it says import site error. I know this
> > > module site is no longer required in Python 2.0 after dereading some
> > > doc in pytho.org. how can I make thie error go away??
> >
> > That is incorrect. Where did you read that? site.py is still needed.
>
> Perhaps from the site.py included in 2.0?
> """
> Append module search paths for third-party packages to sys.path.
>
> ****************************************************************
> * This module is automatically imported during initialization. *
> ****************************************************************
>
> In earlier versions of Python (up to 1.5a3), scripts or modules that
> needed to use site-specific modules would place ``import site''
> somewhere near the top of their code.  Because of the automatic
> import, this is no longer necessary (but code that does it still
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> works).
>
> """
> (emphasis mine)
>
> I, too am having problems importing site.py and os, at least Zope is
> anyway. I can do it just fine from the interpeter... it seems that not
> allcode that does it still works. :(
>
> --
> Bill Anderson               Linux Specialist
> Modular Network Storage     R&D
> Random Quote:
>     Portable: survives system reboot.
>
"This is no longer necessary" in the code refers to the explicit

    import site

statement which used to be required in Python programs (I understand).
Since 1.5 final the import of this module has been automatic.  Site
customizations should be specified in ...

sitecustomize.py

imported, if importable, automatically by site.py

regards
 Steve






More information about the Python-list mailing list