Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30278
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-09-26 23:26 -0700 |
| References | <12b64802-d598-441b-b3cd-87ec17bba514@googlegroups.com> <mailman.417.1347197960.27098.python-list@python.org> |
| Subject | Re: Does os.getcwd() and os.curdir have the same effect ? |
| From | iMath <redstone-cold@163.com> |
| Message-ID | <mailman.1476.1348727202.27098.python-list@python.org> (permalink) |
On Sunday, September 9, 2012 9:39:28 PM UTC+8, Thomas Jollans wrote: > On 09/09/2012 03:22 PM, iMath wrote: > Does os.getcwd() and os.curdir have the same effect ? > Python 3.2.3 (default, May 3 2012, 15:51:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.getcwd() '/home/tjol' >>> os.curdir '.' >>> No. Both refer to the current directory, but os.curdir is not an absolute path, so you can't chdir() to it later and expect to land it the original directory. get it ,thanks
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Does os.getcwd() and os.curdir have the same effect ? iMath <redstone-cold@163.com> - 2012-09-09 06:22 -0700
Re: Does os.getcwd() and os.curdir have the same effect ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-09 13:38 +0000
Re: Does os.getcwd() and os.curdir have the same effect ? Thomas Jollans <t@jollybox.de> - 2012-09-09 15:39 +0200
Re: Does os.getcwd() and os.curdir have the same effect ? iMath <redstone-cold@163.com> - 2012-09-26 23:26 -0700
Re: Does os.getcwd() and os.curdir have the same effect ? iMath <redstone-cold@163.com> - 2012-09-26 23:26 -0700
csiph-web