[IPython-User] Automatically change to specific directory on start up?

reckoner reckoner@gmail....
Wed Aug 3 10:42:22 CDT 2011

For the solution you provide, it's actually not necessary. I just 
thought it would be a good tip for Windows users to be aware of in the 
case of extremely long and complicated paths with spaces in them.

The downside of this technique is that it makes the so-created pathname 
illegible (but short!).

On Wednesday, August 03, 2011 8:38:07 AM, Thomas Kluyver wrote:
> On 3 August 2011 16:24, reckoner <reckoner@gmail.com 
> <mailto:reckoner@gmail.com>> wrote:
>     Thanks. It works! For Windows users, you can use the win32api module
>     to compress the pathname, especially useful if it has spaces in it:
>                 import win32api
>                 win32api.GetShortPathName ('C:\Documents and Settings')
>     'C:\\DOCUME~1'
> Is the short name needed to change directory? I wonder if this could be 
> automated as part of the %cd magic.
> Thomas

More information about the IPython-User mailing list