Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44538

Re: Unwanted window spawns when using Tkinter with multiprocessing.

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.054
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; '"__main__":': 0.09; '__name__': 0.09; 'subject:using': 0.09; 'def': 0.12; 'key)': 0.16; 'subject:Tkinter': 0.16; 'subject:skip:m 10': 0.16; 'subject:when': 0.16; 'tk()': 0.16; 'wrote:': 0.18; 'code,': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'skip:m 30': 0.32; 'skip:# 10': 0.33; 'subject:with': 0.35; 'window': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'dave': 0.60; 'new': 0.61; "you're": 0.61; 'received:74.208': 0.68; 'email addr:rocketmail.com': 0.84; 'received:74.208.4.194': 0.84; 'skip:w 60': 0.84; 'subject:Unwanted': 0.84
Date Tue, 30 Apr 2013 08:30:27 -0400
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
MIME-Version 1.0
To python-list@python.org
Subject Re: Unwanted window spawns when using Tkinter with multiprocessing.
References <7df67006-2176-42cb-a8ce-95a72339e7e2@googlegroups.com> <814cb4a9-6ae5-42df-a697-b4ce8e2e4c56@googlegroups.com>
In-Reply-To <814cb4a9-6ae5-42df-a697-b4ce8e2e4c56@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:VvGrA7f5jJnPM++uQDimZLR86M3jWZCVuefxqIrVUfE fWsTDtdOSgcMaTTNZvEAB5oZBfUgy6VhXaMxlHznmr/gD/dOcd 4OUVcnAgDEQDFvG1WQ+N/PbBOarkhsMHFu9GfshgmOlSaP5M/6 l5KBwGMfASps07YeeKyoxNilX4zbyafMAAPyOhUfgxW5gFn/Za wRUHxLdiyMKCeZKU179j+r+TPM7Db9afGO8x0bfg/WzfpQ0nQX VPDSlZNfLiNHNCDATIZrmJJuylpHNZKjW/ek/1Ky6hi4abZmjG TPo4ogPKa7vBO/gXV54IA1FfiUK6ffvbBB0dygpEQQ3/fZu7A= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1177.1367325048.3114.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367325048 news.xs4all.nl 15985 [2001:888:2000:d::a6]:58620
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44538

Show key headers only | View raw


On 04/30/2013 08:22 AM, alternative00@rocketmail.com wrote:
>   > Dave A.
>
> Yeah I'm using MRAB's code, my current code is :
>
>
> #Initalisation
> global event
> global hitkey
>
>
> #Functions
> def key(event):
>
>       hitkey = event.char
>       instance = multiprocessing.Process(target=player, args=(hitkey,))
>       instance.start()
>
>
> def player(hitkey):
>       winsound.PlaySound(hitkey + '.wav', winsound.SND_FILENAME|winsound.SND_NOWAIT|winsound.SND_ASYNC)
>
>
> if __name__ == "__main__":
>
>
>       fenetre = Tk()
>       frame = Frame(fenetre, width=200, height=100)
>
>
>       frame.focus_set()
>       frame.bind("<Key>", key)
>       frame.pack()
>       fenetre.mainloop()
>

And you're still getting a new window ?  Wow!


-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 11:33 -0700
  Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 17:18 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 15:23 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 19:10 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 16:40 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 20:24 -0400
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-29 13:03 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 08:31 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. MRAB <python@mrabarnett.plus.com> - 2013-04-29 18:03 +0100
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 10:32 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-30 03:45 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 11:44 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-30 08:00 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 18:17 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-29 22:05 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-30 05:22 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <d@davea.name> - 2013-04-30 08:30 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-30 05:31 -0700

csiph-web