Browse Source

use Thread instead of Pool due to python 3.7 issue

pull/331/head
Chris 6 years ago
parent
commit
abd69a9bae
3 changed files with 7 additions and 4 deletions
  1. 2
      gooey/__init__.py
  2. 7
      gooey/gui/processor.py
  3. 2
      setup.py

2
gooey/__init__.py

@ -2,4 +2,4 @@ import os
from gooey.python_bindings.gooey_decorator import Gooey from gooey.python_bindings.gooey_decorator import Gooey
from gooey.python_bindings.gooey_parser import GooeyParser from gooey.python_bindings.gooey_parser import GooeyParser
__version__ = '1.0.1'
__version__ = '1.0.2'

7
gooey/gui/processor.py

@ -3,7 +3,7 @@ import re
import subprocess import subprocess
import sys import sys
from functools import partial from functools import partial
from multiprocessing.dummy import Pool
from threading import Thread
from gooey.gui import events from gooey.gui import events
from gooey.gui.pubsub import pub from gooey.gui.pubsub import pub
@ -52,7 +52,10 @@ class ProcessController(object):
command, command,
bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE, bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stderr=subprocess.STDOUT, shell=True, env=env) stderr=subprocess.STDOUT, shell=True, env=env)
Pool(1).apply_async(self._forward_stdout, (self._process,))
t = Thread(target=self._forward_stdout, args=(self._process,))
t.start()
def _forward_stdout(self, process): def _forward_stdout(self, process):
''' '''

2
setup.py

@ -6,7 +6,7 @@ from setuptools import setup, find_packages
with open('README.md') as readme: with open('README.md') as readme:
long_description = readme.read() long_description = readme.read()
version = '1.0.1'
version = '1.0.2'
deps = [ deps = [
'Pillow>=4.3.0', 'Pillow>=4.3.0',

Loading…
Cancel
Save