[Tutor] Directories and Macintosh

Steven D'Aprano steve at pearwood.info
Fri May 29 20:06:39 CEST 2015


Hi Dylan, and welcome!


On Fri, May 29, 2015 at 05:10:33PM +0000, Barth, Dylan wrote:

> Hi there, I've never used this before and I'm very new to programming, 
> but I have an interesting and unique problem. I want to change my 
> working directory in python (permanently if at all possible) 

"Working directory" has a technical meaning in programming, and I don't 
think it is relevant to what you seem to be talking about here. Can you 
explain what you mean by "working directory"?


> and nothing I can find online works, even when I've copy/pasted it into 
> python. I downloaded the anaconda package and the directory right now 
> goes into that folder instead of a different place. No matter what I 
> do, when I put in a path for it to look at like 
> "/Users/name/anaconda/lib/python2.7/Directory/datacopy?" It either 
> gives back an error that it "User" is undefined or that the files that 
> are within that directory don't exist (when I copy the path straight 
> from the Terminal window). Can anyone help?

Not with the information you have given us, which is vague and 
mysterious. You will need to be much more precise and detailed.

You downloaded anaconda into which directory?

What do you mean, "goes into that folder instead of a different place" 
-- what's "that" folder, and where did you expect it to go?

"when I put in a path for it to look at" -- how do you do that? Where do 
you put this path?

Please copy and paste the EXACT error, don't summarise, abbreviate, 
simplify, or put it in your own words.

We're happy to help, as best we can, but we need more information from 
you, because at the moment it is a bit like "I'm trying to find that 
thing, you know the one, it's like that other thing but different, and I 
looked in that place and it wasn't there." *wink*


> Ps: Running Python 2.7 on a Macintosh

That's a good start!



-- 
Steve


More information about the Tutor mailing list