This file contains 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
import sys | |
print('Arguments were', repr(sys.argv)) | |
from argparse import ArgumentParser | |
import multiprocessing | |
from random import randrange | |
from time import sleep | |
def talk(x): | |
sleep(x) |
This file contains 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/env python | |
from __future__ import print_function | |
import io | |
import glob | |
import os | |
import subprocess | |
os.chdir(os.path.dirname(__file__)) | |
priv_file = 'MOK.priv' |
This file contains 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
import unittest | |
class SampleTest(unittest.TestCase): | |
def test_skipTest(self): | |
self.skipTest('lowecase') | |
def test_SkipTest(self): | |
raise unittest.SkipTest('UpperCase') |
This file contains 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
# Tests for bpo-21417 | |
import itertools | |
import os.path | |
import tempfile | |
import zipfile | |
# Compress a large-ish file, like the dictionary | |
file_path = '/usr/share/dict/american-english' | |
# Read its contents for later comparison |
This file contains 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
from glob import iglob | |
from os import chdir | |
from os.path import join | |
from subprocess import check_call | |
infile_dir = "/path/somewhere" | |
chdir(infile_dir) | |
for file_path in sorted(iglob('*.mp3')): | |
print(file_path) |
NewerOlder