Current drive and directory

EAS eriksp at attbi.nospam.com
Wed May 26 17:56:18 EDT 2004


Howcome when I run this script:

print """MS-DOS Prompt
'Q' to Quit"""

import os
command = ""

while command.lower() != "q":
        directory = os.getcwd()
        print "\n", directory, "\b>",
        command = raw_input("\b")
        os.system(command)

it doesn't update the directory when I use 'cd' for the command prompt?







More information about the Python-list mailing list