[Tutor] Running Existing Python

Steven D'Aprano steve at pearwood.info
Sun Feb 27 00:37:38 CET 2011


Justin Bonnell wrote:

> --My current working directory is not what I have been trying to cd to, so I'm assuming that I am using the cd command wrong. 


You don't need to cd into the current working directory. You're already 
there. That's what "working directory" means -- the directory you just 
cd'ed into.

But you can if you like. That's just:

cd .

Dot always means "this directory", no matter where you are.


> I have tried:
> 
> $ cd /jwbonnell/bin/Python\2.7/Extras/Demo/tkinter/guido

And what happened?

Please run these two lines and copy and paste the results back to us:


ls -ld /jwbonnell
ls -ld /home/jwbonnell




> $ cd /jwbonnell/bin/Python\2.7/Extras/Demo/tkinter/guido/hello.py
> $ cd /jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py

cd stands for Change Directory. You can't cd into a file.


-- 
Steven



More information about the Tutor mailing list