468,301 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

How to find the present working directory using python.

how to find out the present working directory using python.

os.system('pwd') works good. But i need some specific one in
python rather than embedding shell command into python.

May 4 '07 #1
3 70604
On May 4, 12:03 pm, pradeep nair <deep...@gmail.comwrote:
how to find out the present working directory using python.

os.system('pwd') works good. But i need some specific one in
python rather than embedding shell command into python.

os.path.getcwd()

May 4 '07 #2
On May 4, 12:05 pm, SamG <mad.vi...@gmail.comwrote:
On May 4, 12:03 pm, pradeep nair <deep...@gmail.comwrote:
how to find out the present working directory using python.
os.system('pwd') works good. But i need some specific one in
python rather than embedding shell command into python.

os.path.getcwd()


Thank u...

May 4 '07 #3
how to find out the present working directory using python.
Try this:

import os
os.getcwd()

It returns the current working directory.

Thanks,

- Isaac.

May 4 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Thomas Pfaff | last post: by
6 posts views Thread by Peter Maas | last post: by
29 posts views Thread by 63q2o4i02 | last post: by
1 post views Thread by Michael Torrie | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.