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.
nuaris 0 Newbie Poster
Recommended Answers
Jump to PostMost 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 Replies
ITVanguard 0 Newbie Poster
sneekula 969 Nearly a Posting Maven
nuaris 0 Newbie Poster
BearofNH 104 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.