开发者

Python working directory messed up

开发者 https://www.devze.com 2023-03-23 02:07 出处:网络
After having this problem: look I checked some things: When going into my virtualenv and cd ing into my django directory, i have the right directory

After having this problem: look

I checked some things:

When going into my virtualenv and cd ing into my django directory, i have the right directory

~/Projects/mysite/mysite

when going into python: os.getcwd() returns ~/Projects/MYSITE/MYSITE

the first mysite is the virtualenv the second the django project

开发者_运维百科

so thats why django doesn't work anymore for me

This all occurred after my computer crashed last night, i am running lion

this happens whether i am in my virtualenv or not(activated or deactivated

any way to reset this behavior

thanks for any help


I have a hunch. Mac OS X's behavior with respect to case is a bit complicated. For example, using default settings on OS 10.6.6, you can create a directory MINE, which will show up as uppercase in directory listings, but will be accessible using both lower- and uppercase. So for example:

:~/foo $ mkdir MINE
:~/foo $ ls
MINE
:~/foo $ cd mine
:~/foo/mine $ ls -al

My guess is that when your computer crashed, some sort of recovery had to be done, and the directories were recreated using uppercase letters. Try renaming them.

:~/foo $ mv MINE mine2
:~/foo $ mv mine2 mine
:~/foo $ ls
mine
0

精彩评论

暂无评论...
验证码 换一张
取 消