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
def test(x): | |
import time | |
print('entering', x) | |
time.sleep(1) | |
print('exiting', x) | |
import concurrent.futures | |
with concurrent.futures.ProcessPoolExecutor(max_workers=4) as executor: | |
out = [executor.map(test, range(200))] | |
concurrent.futures.wait(out) |
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
def test(x): | |
import time | |
print('entering', x) | |
time.sleep(1) | |
print('exiting', x) | |
import concurrent.futures | |
with concurrent.futures.ProcessPoolExecutor(max_workers=4) as executor: | |
out = [executor.submit(test(x)) for x in range(200)] | |
concurrent.futures.wait(out) |
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 | |
import os | |
import time | |
from pathlib import Path | |
from PyQt5.Qt import * # noqa | |
class FileSystemModel(QFileSystemModel): |
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 | |
from PyQt5.Qt import * # noqa | |
def main(): | |
app = QApplication(sys.argv) | |
def previous_file(): | |
print("previous_file spawned") |
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 | |
from PyQt5.Qt import * # noqa | |
def main(): | |
app = QApplication(sys.argv) | |
def previous_file(): | |
print("previous_file spawned") |
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 | |
import attr | |
from PyQt5 import Qt | |
app = Qt.QApplication(sys.argv) | |
main_window = Qt.QMainWindow() |

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 | |
import os | |
import time | |
from PyQt5.Qt import * # noqa | |
class Foo(QTableView): | |
def __init__(self, path, extensions, parent=None): |
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
# -*- coding: utf-8 -*- | |
# Form implementation generated from reading ui file '/Users/epi/Desktop/ImageBrowser/qtui/redox_ui.ui' | |
# | |
# Created by: PyQt5 UI code generator 5.10.1 | |
# | |
# WARNING! All changes made in this file will be lost! | |
from PyQt5 import QtCore, QtGui, QtWidgets |
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 | |
from PyQt5.Qt import * # noqa | |
def main(): | |
app = QApplication(sys.argv) | |
widget = QPlainTextEdit() | |
widget.setLineWrapMode(QPlainTextEdit.NoWrap) | |
lines = [ |