This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # Import the subprocess module (see https://pymotw.com/2/subprocess for more) | |
| import subprocess | |
| # List files, then create a file and echo into it like you would the shell | |
| subprocess.call("ls") | |
| subprocess.call(["touch", "testing.txt"]) | |
| subprocess.call(["echo", "jub jub"]) | |
| subprocess.call("echo 'jub jub' > testing.txt", shell=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| std::cout << "Hello world!" << std::endl; | |
| return 0; | |
| } |