Re: Problem with os.chdir()

2009-03-11 Thread van Asselt
Hello, In order to prevent this type of problems, I alway do the following: import path path = something path = os.path.normpath(path) os.chdir(path) This prevents a lot of problems for me. Regards, Henk "Tim Golden" wrote in message news:mailman.1646.1236751732.11746.python-l...@python.org

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
Hendrik van Rooyen wrote: "Tim Golden" wrote: Well, a little bit of experimentation shows that you can *create* paths this deep (say, with os.mkdir). But you can't actually set the current directory to it. So the Is this also true if you try to go there by a succession of shorter hops of the

Re: Problem with os.chdir()

2009-03-11 Thread Hendrik van Rooyen
"Tim Golden" wrote: > Well, a little bit of experimentation shows that you can > *create* paths this deep (say, with os.mkdir). But you > can't actually set the current directory to it. So the Is this also true if you try to go there by a succession of shorter hops of the ./next_level kind? - H

Re: Problem with os.chdir()

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 11:59:57 -0200, venutaurus...@gmail.com escribió: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: > On Mar 11, 5:19 pm, Tim Golden wrote: Well, the source for os.chdir under Windows uses the Win32 SetCurrentDirectoryW API as expected. What is not exp

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 7:17 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 7:17 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 6:41 pm, Tim Golden wrote: > >> venutaurus...@gmail.com wrote: > >>> On Mar 11, 5:19 pm, Tim Golden wrote: > > Here is my code snippet which you will be interested in: > Indeed. > > file = ur'\\?\C

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel0

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 6:41 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 5:19 pm, Tim Golden wrote: > >>> Here is my code snippet which you will be interested in: > >> Indeed. > > >>> file = ur'\\?\C:\\TestDataSet\DeepPaths > >>> \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepP

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLe vel05\DeepPathLevel06\DeepPathLevel07\Dee

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 5:19 pm, Tim Golden wrote: > > Here is my code snippet which you will be interested in: > > Indeed. > > > file = ur'\\?\C:\\TestDataSet\DeepPaths > > \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLe > > vel05\DeepPathLevel06\DeepPathLevel07\DeepPathLevel08\De

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLevel05\DeepPathLevel06\DeepPathLevel07\DeepPathLevel08\DeepPathLevel09\DeepPathLevel10\DeepPathLevel11\DeepPathLeve

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 5:02 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 11:08 am, Tim Golden wrote: > >> venutaurus...@gmail.com wrote: > >>> Hello all, > >>>            I am writing a python script which has to access deep paths > >>> then supported normally by the Windows OS (>255

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 11:08 am, Tim Golden wrote: venutaurus...@gmail.com wrote: Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path i

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 11:08 am, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > Hello all, > >            I am writing a python script which has to access deep paths > > then supported normally by the Windows OS (>255). So I am appending "\ > > \?\" to do so. But when I use the path in the above fashi

Re: Problem with os.chdir()

2009-03-10 Thread Tim Golden
venutaurus...@gmail.com wrote: Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path in the above fashion with os.chdir() it is unable to recognize my folder a

Problem with os.chdir()

2009-03-10 Thread venutaurus...@gmail.com
Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path in the above fashion with os.chdir() it is unable to recognize my folder and throwing an error: Traceback