Currently, I am working a lot with python and django, very nice scripting language and powerful web framework. I used native windows python installation, instead of installing it within cygwin.
The problem occur when I tried to invoke django-admin.py script in cygwin's bash shell. It won't run. It is due to windows version of python expecting windows path of the django-admin.py script as the argument.
Here is the exact situation. Windows python expecting, something like this:
but since I run that command within cygwin, it will become like the following:
and throws some error messages.
So, I searched a bit and found out that cygwin has a tool that converts *nix path to windows path. The name of the tool is cygpath.
And here is what I did to solve the problem.
I created the following file:
python.exe "$(cygpath -aw "/cygdrive/c/Python26/Scripts/django-admin.py")"
Of course you need to make /usr/local/bin/django-admin.py executable
chmod +x /usr/local/bin/django-admin.py
and you can run django-admin.py from anywhere.
Check out the following links for more information: