On 10Sep2011 15:57, Waldek M. wrote:
| On Sat, 10 Sep 2011 21:11:32 +1000, Steven D'Aprano wrote:
| > The main one that comes to mind is os.walk, which has this to say:
| >
| > Caution: if you pass a relative pathname for top, don't change the
| > current working directory between resump
On Sat, 10 Sep 2011 21:11:32 +1000, Steven D'Aprano wrote:
> The main one that comes to mind is os.walk, which has this to say:
>
> Caution: if you pass a relative pathname for top, don't change the
> current working directory between resumptions of walk. walk never
> changes the cur
Waldek M. wrote:
> On Fri, 09 Sep 2011 23:03:10 +1000, Steven D'Aprano wrote:
>> But think carefully before doing this. Some functions may be confused if
>> you change directories while they are running. You may be better off
>> staying in the same directory, and adjusting the path names to the fi
On Fri, 09 Sep 2011 23:03:10 +1000, Steven D'Aprano wrote:
> But think carefully before doing this. Some functions may be confused if you
> change directories while they are running. You may be better off staying in
> the same directory, and adjusting the path names to the files as you work
> with
On 9/9/2011 6:07 AM, kaustubh joshi wrote:
Hello friends,
How do we carry out the command "*cd ..*" in
python?
os.chdir, like so:
>>> os.getcwd()
'/home/tyler'
>>> os.chdir("../")
>>> os.getcwd()
'/home'
So you could do something like: os.chdir("../foo")
My problem
On 9/9/2011 9:03 AM, Steven D'Aprano wrote:
kaustubh joshi wrote:
Hello friends,
How do we carry out the command "*cd ..*" in
python?
import os
os.chdir('..')
But think carefully before doing this. Some functions may be confused if you
change directories while they
kaustubh joshi wrote:
> Hello friends,
> How do we carry out the command "*cd ..*" in
> python?
import os
os.chdir('..')
But think carefully before doing this. Some functions may be confused if you
change directories while they are running. You may be better off staying
2011/9/9 kaustubh joshi :
> Hello friends,
> How do we carry out the command "cd .." in python?
>
> My problem is :
> I have a set of folders say m=1,2,3,4. In each of these folders, I have
> subfolders with common name say m_5,m_6,m_7,m_8. In each of these subfolder,
> the
Hello friends,
How do we carry out the command "*cd ..*" in
python?
My problem is :
I have a set of folders say m=1,2,3,4. In each of these folders, I have
subfolders with common name say m_5,m_6,m_7,m_8. In each of these subfolder,
there is a file which I have edit.