How do I read something from DOS? For example, doing a command in DOS, like 'dir'/etc. and writing the output to a variable in python? I know about the listdir() function, 'dir' in DOS is just an example.
Jump to Post
Most of the DOS commands you are familiar with are contained in these two modules:
import os os.chdir(path) change directory to the one in path os.curdir return current directory os.chmod(path, mode) change the mode of path to the new mode os.getcwd() return the current working directory os.mkdir(path[, …
All 4 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.