What commands would I utilize to do this? Specifically selecting the C: path and utilizing mkdir.
In the Python shell, first import the sys and subprocess modules. Refer to the following Python documentation for more on importing modules: Python Software Foundation. The import system.
2. Execute os.getlogin(). Refer to Python Software Foundation Miscellaneous operating system interfaces.
3. Execute os.exec_path(). Refer to Python Software Foundation Miscellaneous operating system interfaces.
4. Take a screenshot.
5. Execute sys.path. Refer to Python Software Foundation System-specific parameters and functions.
6. Execute sys.byteorder. Refer to Python Software Foundation System-specific parameters and functions.
7. Take a screenshot.
8. Execute os.listdir on your C: drive. Refer to Python Software Foundation Miscellaneous operating system interfaces.
9. Use os.mkdir to make a new folder on your C: drive named tempPython. Refer to Python Software Foundation Miscellaneous operating system interfaces.
10. Take a screenshot.
11. Use subprocess.Popen to execute the Windows dir command and have its output placed in a text file named pythonOut.txt. Hint: The argument for Popen in this case will be (C:\windows\system32\cmd.exe "/c dir C:\ > C:\pythonOut.txt"). Refer to Python Software Foundation Subprocess management.
12. Open pythonOut.txt in Notepad and position that window next to the Python shell window where both can be seen.
13. Take a screenshot.
14. Use subprocess.Popen to open the Windows calc.exe utility. Refer to Python Software Foundation Subprocess management.
15. Take a screenshot.