Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28772
| Date | 2012-09-09 15:39 +0200 |
|---|---|
| From | Thomas Jollans <t@jollybox.de> |
| Subject | Re: Does os.getcwd() and os.curdir have the same effect ? |
| References | <12b64802-d598-441b-b3cd-87ec17bba514@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.417.1347197960.27098.python-list@python.org> (permalink) |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next 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