[Tutor] Python 2.0 newbie questions

Glenn T. Norton gtnorton@earthlink.net
Fri, 27 Oct 2000 20:35:44 -0700


alan.gauld@bt.com wrote:

> > First make sure your path is set. Here's what I have(on Win98): SET
> > PATH=C:\PYTHON20;%PATH%
>
> > Create a folder in the Python directory, such as "mypython".
> > Create the file, such as "hello.py"
> > Save it in the "mypython" directory.
>
> >In which case you should also add to your AUTOEXEC:
> >SET PYTHONPATH=C:\PYTHON20\MYPYTHON

   > Then you don't need to do this:
   > Go to the command line, IDLE or PythonWin and at the prompt, type...
   > import os
   > os.chdir('C:\PYTHON20\MYPYTHON')    #make sure to include the single
   > quotes

    Is this in anyway wrong? meaning is it dangerous or flatout wrong
    to import modules this way?. I just find that it's a little quicker to
use
    "import os/os.chdir(' ')" and include the path in the IDLE path
browser
    than to add to my already bloated AUTOEXEC and reboot windows
    everytime I create a new project folder.

    Looking forward to the your book.
    Regards,
    gtnorton


>
>
>