I have cygwin installed on my win 7 pc. When I’m running the python shell, I get the OS name as posix (which is expected) and many DOS commands don’t work using os.system("DOS command").
Is there a way I can avoid entering the posix shell from Windows command prompt?
You need to run the native Windows Python interpreter rather than the Cygwin port.
Assuming you already have both installed on your system, check your PATH setting to confirm the native Windows edition comes first.
If this doesn’t work for you, and you’d RATHER run the Cygwin port, then you are going to have to avoid os.system() calls, and instead switch to using the new subprocess package. Give a read over http://docs.python.org/library/subprocess.html