'rar' is not recognized as an internal or external command£¿£¿£¿£¿
cn.popeye
zhangchao19 at hotmail.com
Fri Feb 24 02:43:13 EST 2006
os.chdir() ?
thank you!
--
????
"Dennis Lee Bieber" <wlfraed at ix.netcom.com> ????
news:2n6tv1h0hgdp3ajua4vb9eaipv3pccf9p0 at 4ax.com...
> On Fri, 24 Feb 2006 11:36:08 +0800, "Ê÷Éϲä»Ò" <zhangchao19 at hotmail.com>
> declaimed the following in comp.lang.python:
>
> > thank everyone!!!
> >
> I'd had to run to work so couldn't test, but... notice this:
>
>
> C:\Documents and Settings\Dennis Lee Bieber>python
> ActivePython 2.3.5 Build 236 (ActiveState Corp.) based on
> Python 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.system("dir /w")
> Volume in drive C is System
> Volume Serial Number is 0487-A514
>
> Directory of C:\Documents and Settings\Dennis Lee Bieber
>
> [.] [..] [.eclipse]
> [.gps] [.mysqlcc] [.netbeans]
> [.refactorit] [.refactorit_please_delete_me]
> [Application Data]
> [Desktop] Eudora.lnk [Favorites]
> [Start Menu] [workspace]
> 1 File(s) 820 bytes
> 13 Dir(s) 22,481,092,608 bytes free
> 0
> >>> os.system("cd e:\\userdata")
> 0
> >>> os.system("dir /w")
> Volume in drive C is System
> Volume Serial Number is 0487-A514
>
> Directory of C:\Documents and Settings\Dennis Lee Bieber
>
> [.] [..] [.eclipse]
> [.gps] [.mysqlcc] [.netbeans]
> [.refactorit] [.refactorit_please_delete_me]
> [Application Data]
> [Desktop] Eudora.lnk [Favorites]
> [Start Menu] [workspace]
> 1 File(s) 820 bytes
> 13 Dir(s) 22,481,092,608 bytes free
> 0
> >>> os.chdir("e:\\userdata")
> >>> os.system("dir /w")
> Volume in drive E is Data
> Volume Serial Number is 2626-D991
>
> Directory of e:\userdata
>
> [.] [..] [Dennis Lee Bieber]
> DummyQuicken.IDX
> DummyQuicken.QDF DummyQuicken.QEL DummyQuicken.QPH [Root]
> 4 File(s) 316,184 bytes
> 4 Dir(s) 307,433,058,304 bytes free
> 0
> >>>
>
> Notice how using os.system() to do a "cd" doesn't "stick"... But if
> you used os.chdir() instead, THAT setting carries over to subsequent
> os.system() calls.
>
> --
> > ============================================================== <
> > wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> > wulfraed at dm.net | Bestiaria Support Staff <
> > ============================================================== <
> > Home Page: <http://www.dm.net/~wulfraed/> <
> > Overflow Page: <http://wlfraed.home.netcom.com/> <
More information about the Python-list
mailing list