Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the Python shell, execute the following functions. You will take screenshots at key points to show the successful execution. These will be placed in

Using the Python shell, execute the following functions. You will take screenshots at key points to show the successful execution. These will be placed in a single Word document. Recommended screenshot points are listed within the assigned functions, but you may add screenshots if necessary, to show the successful completion of the assignment. (Hint: Under Windows, some of these functions will accept a single backslash in a file path, while others require double backslash between folders.)
Assignment Instructions
In the Python shell, first import the sys, os, and subprocess modules.
Refer to the following Python documentation for more on importing modules: Python Software Foundation. The import system.
Execute os.getlogin()
Refer to Python Software Foundation. Miscellaneous operating system interfaces.
Execute os.get_exec_path()
Refer to Python Software Foundation. Miscellaneous operating system interfaces.
Take a screenshot.
Execute sys.path
Refer to Python Software Foundation. System-specific parameters and functions
Execute sys.byteorder
Refer to Python Software Foundation. System-specific parameters and functions.
Take a screenshot.
Execute os.listdir on your C: drive
Refer to Python Software Foundation. Miscellaneous operating system interfaces.
Use os.mkdir to make a new folder on your C: drive named tempPython
Refer to Python Software Foundation. Miscellaneous operating system interfaces.
Take a screenshot.
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.
Open pythonOut.txt in Notepad and position that window next to the Python shell window where both can be seen.
Take a screenshot.
Use subprocess.Popen to open Windows calc.exe utility
Refer to Python Software Foundation. Subprocess management.
Take a screenshot.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

mple 10. Determine d dx S 0 t dt.

Answered: 1 week ago