How to add a leading slash when joining with os.path.join?

my_list = ['', 'drive', 'test', filename] path = os.path.join(*my_list) Result for path is drive/test/filename The desired result for path would be /drive/test/filename (with the leading slash, because i do have a ”, at the start of my_list I ended up using os.path.sep.join(my_list), which produces /drive/test/filename with the leading slash as desired, but i was wondering … Read more

IPython Notebook locale error

After installing the latest Mac OSX 64-bit Anaconda Python distribution, I keep getting a ValueError when trying to start the IPython Notebook. Starting ipython works fine: 3-millerc-~:ipython Python 2.7.3 |Anaconda 1.4.0 (x86_64)| (default, Feb 25 2013, 18:45:56) Type "copyright", "credits" or "license" for more information. IPython 0.13.1 — An enhanced Interactive Python. ? -> Introduction … Read more

How to uninstall Python 2.7 on a Mac OS X 10.6.4?

I want to completely remove Python 2.7 from my Mac OS X 10.6.4. I managed to remove the entry from the PATH variable by reverting my .bash_profile. But I also want to remove all directories, files, symlinks, and entries that got installed by the Python 2.7 install package. I’ve got the install package from http://www.python.org/. What directories/files/configuration file entries do I need to remove? Is there a list somewhere?